24 #ifndef PPL_meta_programming_hh
25 #define PPL_meta_programming_hh 1
31 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
41 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
42 #define const_bool_nodef(name, value) \
43 enum const_bool_value_ ## name { PPL_U(name) = (value) }
45 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
55 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
56 #define const_int_nodef(name, value) \
57 enum anonymous_enum_ ## name { PPL_U(name) = (value) }
59 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
70 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
71 #define const_value_nodef(type, name, value) \
72 static type PPL_U(name)() { \
76 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
87 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
88 #define const_ref_nodef(type, name, value) \
89 static const type& PPL_U(name)() { \
90 static type PPL_U(name) = (value); \
94 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
101 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
105 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
113 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
118 #define PPL_COMPILE_TIME_CHECK_NAME(suffix) compile_time_check_ ## suffix
119 #define PPL_COMPILE_TIME_CHECK_AUX(e, suffix) \
120 enum anonymous_enum_compile_time_check_ ## suffix { \
122 PPL_COMPILE_TIME_CHECK_NAME(suffix) \
123 = sizeof(Parma_Polyhedra_Library::Compile_Time_Check<(e)>) \
126 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
132 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
133 #define PPL_COMPILE_TIME_CHECK(e, msg) PPL_COMPILE_TIME_CHECK_AUX(e, __LINE__)
135 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
141 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
149 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
155 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
159 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
165 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
169 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
177 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
178 template <
typename T1,
typename T2>
182 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
190 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
191 template <
typename T>
195 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
221 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
222 template <
typename Base,
typename Derived>
225 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
226 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
230 template <
typename T>
235 static char func(
const Base&);
244 "architecture with sizeof(char) == sizeof(double)"
259 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
268 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
269 template <
bool b,
typename T =
void>
273 template <
typename Type, Type,
typename T =
void>
278 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
303 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
304 template <
typename T>
309 template <
typename T>
325 #if PPL_SUPPORTED_FLOAT
328 #if PPL_SUPPORTED_DOUBLE
329 template <>
struct Is_Native<double> :
public True { };
331 #if PPL_SUPPORTED_LONG_DOUBLE
332 template <>
struct Is_Native<
long double> :
public True { };
341 #endif // !defined(PPL_meta_programming_hh)
A class holding a constant called value that evaluates to true if and only if T1 is the same type as ...
static const Derived & derived_object()
A function obtaining a const reference to a Derived object.
A class that is only defined if b evaluates to true.
PPL_COMPILE_TIME_CHECK(sizeof(char)!=sizeof(double),"architecture with sizeof(char) == sizeof(double)"" (!?)")
signed signed signed signed signed char signed signed signed signed signed int signed long long
A class that is constructible from just anything.
signed signed signed signed signed char signed signed signed signed signed int signed long signed long signed long signed long signed long long unsigned short
A class holding a constant called value that evaluates to true if and only if Base is the same type a...
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir unsigned int
A class holding a constant called value that evaluates to true.
The entire library is confined to this namespace.
static char func(const Base &)
Overloading with Base.
A class that provides a type member called type equivalent to T if and only if b is true...
A class holding a constant called value that evaluates to false.
A class holding a constant called value that evaluates to b.
Any(const T &)
The universal constructor.