IsTrue< condition > Struct Template Reference
[Common]

#include <static_assert.hh>

List of all members.


Detailed Description

template<bool condition>
struct IsTrue< condition >

(DEPRECATED) Helper template so that compilation fails if condition is not true.

Deprecated:
Use dune_static_assert instead.
If the condition is true a static function yes is available, othewise the only function available is no().

Example for compile time check whether two types are the same:

    IsTrue<is_same<int,int>::value>::yes(); // 
    IsTrue<is_same<bool,int>::value>::yes(); // false, will trigger a compile time error

A test that trigger a compile time error if condition is true:

    IsTrue<condition>::no()

Static Public Member Functions

static void no ()

Member Function Documentation

template<bool condition>
static void IsTrue< condition >::no (  )  [inline, static]


The documentation for this struct was generated from the following file:

Generated on Sun Nov 15 22:28:16 2009 for dune-common by  doxygen 1.5.6