ARB
Classes | Namespaces | Macros
static_assert.h File Reference
#include <cxxforward.h>
#include "stringize.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_UNIQUETYPE(typename)   concatenate_pscans(typename,__LINE__)
 
#define COMPILE_ASSERTED_TYPE(const_expression)   ::arb_compile_assertion::static_assert_test<sizeof(::arb_compile_assertion::is< (bool)( const_expression ) >)>
 
#define ASSERT_VIA_IS(type_definition, type_id)   typedef type_definition type_id; struct concatenate(using_,type_id) { type_id instance; }
 
#define STATIC_ASSERT(const_expression)   ASSERT_VIA_IS(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_UNIQUETYPE (   typename)    concatenate_pscans(typename,__LINE__)

Definition at line 34 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 ASSERT_VIA_IS (   type_definition,
  type_id 
)    typedef type_definition type_id; struct concatenate(using_,type_id) { type_id instance; }

Definition at line 36 of file static_assert.h.

#define STATIC_ASSERT (   const_expression)    ASSERT_VIA_IS(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 38 of file static_assert.h.