IsTrue< condition > Struct Template Reference
[Common (foundation classes)]

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

#include <dune/common/static_assert.hh>

List of all members.

Static Public Member Functions

static void no ()

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()

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 Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3