17 #ifndef STXXL_META_TEMPLATE_PROGRAMMING
18 #define STXXL_META_TEMPLATE_PROGRAMMING
20 #include <stxxl/bits/namespace.h>
21 #include <stxxl/bits/common/types.h>
24 __STXXL_BEGIN_NAMESPACE
30 template <
bool Flag,
class Type1,
class Type2>
36 template <
class Type1,
class Type2>
37 struct IF<false, Type1, Type2>
45 template <
bool Flag,
unsigned Num1,
unsigned Num2>
54 template <
unsigned Num1,
unsigned Num2>
55 struct IF_N<false, Num1, Num2>
63 const int DEFAULT = ~(~0u >> 1);
67 template <
int tag_,
class Type_,
class Next_ = NilCase>
75 template <
int tag,
class Case>
78 typedef typename Case::Next NextCase;
82 found = (caseTag == tag || caseTag == DEFAULT)
86 typedef typename IF<found,
88 typename SWITCH<tag, NextCase>::result
93 class SWITCH<tag, NilCase>
96 typedef NilCase result;
100 template <
unsigned_type Input>
130 template <
unsigned_type Input>
163 __STXXL_END_NAMESPACE
165 #endif // !STXXL_META_TEMPLATE_PROGRAMMING
IF template metaprogramming statement.
Definition: tmeta.h:31