IsTrue< condition > Struct Template Reference
#include <static_assert.hh>
Detailed Description
template<bool condition>
struct IsTrue< condition >
Helper template so that compilation fails if condition is not true.
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:
The documentation for this struct was generated from the following file: