49 #ifndef OPENMESH_GENPROG_HH
50 #define OPENMESH_GENPROG_HH
55 #include <OpenMesh/Core/System/config.h>
63 #ifndef DOXY_IGNORE_THIS
69 template <
bool b>
struct Bool2Type {
enum { my_bool = b }; };
72 template <
int i>
struct Int2Type {
enum { my_int = i }; };
75 typedef Bool2Type<true> TrueType;
78 typedef Bool2Type<false> FalseType;
82 template <
bool Expr>
struct AssertCompile;
83 template <>
struct AssertCompile<true> {};
88 #if OM_PARTIAL_SPECIALIZATION
91 template <
bool condition,
class Then,
class Else>
92 struct IF {
typedef Then Result; };
99 template <
class Then,
class Else>
100 struct IF<false, Then, Else> {
typedef Else Result; };
112 template <
class Then,
class Else>
struct Select {
119 template <
class Then,
class Else>
struct Select {
124 template <
bool condition>
struct ChooseSelector {
125 typedef SelectThen Result;
128 template <>
struct ChooseSelector<false> {
129 typedef SelectElse Result;
139 template <
bool condition,
class Then,
class Else>
142 typedef typename ChooseSelector<condition>::Result Selector;
144 typedef typename Selector::template Select<Then, Else>::Result Result;
154 #define assert_compile(EXPR) GenProg::AssertCompile<(EXPR)>();
157 #endif // OPENMESH_GENPROG_HH defined
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56