Template metaprogramming utility routines


Data Structures

struct  LDK::Meta::If< true, TCase, FCase >
struct  LDK::Meta::If< false, TCase, FCase >
struct  LDK::Meta::True
 A metaprogram true value. More...
struct  LDK::Meta::False
 A metaprogram false value. More...
struct  LDK::Meta::CTAssert< true >
struct  LDK::Meta::PowerOf2< N >
 A compile-time loop to test if a number is a power of 2. More...
struct  LDK::Meta::PowerOf2< 2 >
struct  LDK::Meta::PowerOf2< 0 >
struct  LDK::Meta::HalfwayPowerOf2< Size >
 A compile-time test to if a number is a power of 2 plus (itself divided by two). More...
struct  If
 A metaprogrammed "if" statement. More...
struct  LDK::Meta::True
 A metaprogram true value. More...
struct  LDK::Meta::False
 A metaprogram false value. More...
struct  LDK::Meta::PowerOf2< N >
 A compile-time loop to test if a number is a power of 2. More...
struct  LDK::Meta::HalfwayPowerOf2< Size >
 A compile-time test to if a number is a power of 2 plus (itself divided by two). More...

Defines

#define CTASSERT(expr, msg)   LDK::Meta::CTAssert<((expr) != false)> ERROR_##msg;
 A compile-time assert made with templates and a macro.

Define Documentation

#define CTASSERT ( expr,
msg   )     LDK::Meta::CTAssert<((expr) != false)> ERROR_##msg;

Lifted from the Loki library by Andrei Andrescu. Causes a compile error if the condition evaluates to false.

Definition at line 99 of file TemplateMeta.h.

Referenced by LDK::MallocAllocator< T >::allocate(), and LDK::Allocator< T >::allocate().


Generated on Fri Aug 17 18:32:27 2007 for LDK by  doxygen 1.5.1