ARB
Classes | Namespaces | Macros
static_assert.h File Reference
#include <cxxforward.h>
Include dependency graph for static_assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  arb_compile_assertion::is< bool >
 
struct  arb_compile_assertion::is< true >
 
struct  arb_compile_assertion::static_assert_test< x >
 

Namespaces

 arb_compile_assertion
 

Macros

#define CA_JOIN(X, Y)   X##Y
 
#define CA_JOINTYPE(X, Y)   CA_JOIN(X, Y)
 
#define CA_UNIQUETYPE(typename)   CA_JOINTYPE(typename,__LINE__)
 
#define COMPILE_ASSERTED_TYPE(const_expression)   ::arb_compile_assertion::static_assert_test<sizeof(::arb_compile_assertion::is< (bool)( const_expression ) >)>
 
#define STATIC_ASSERT(const_expression)   typedef COMPILE_ASSERTED_TYPE(const_expression) CA_UNIQUETYPE(_arb_compile_assertion_typedef_)
 
#define STATIC_ASSERT_ANNOTATED(const_expression, annotation)   STATIC_ASSERT(const_expression)
 

Macro Definition Documentation

#define CA_JOIN (   X,
 
)    X##Y

Definition at line 31 of file static_assert.h.

#define CA_JOINTYPE (   X,
 
)    CA_JOIN(X, Y)

Definition at line 32 of file static_assert.h.

#define CA_UNIQUETYPE (   typename)    CA_JOINTYPE(typename,__LINE__)

Definition at line 33 of file static_assert.h.

#define COMPILE_ASSERTED_TYPE (   const_expression)    ::arb_compile_assertion::static_assert_test<sizeof(::arb_compile_assertion::is< (bool)( const_expression ) >)>

Definition at line 35 of file static_assert.h.

#define STATIC_ASSERT (   const_expression)    typedef COMPILE_ASSERTED_TYPE(const_expression) CA_UNIQUETYPE(_arb_compile_assertion_typedef_)
#define STATIC_ASSERT_ANNOTATED (   const_expression,
  annotation 
)    STATIC_ASSERT(const_expression)

Definition at line 37 of file static_assert.h.