licornea_tools
Classes | Namespaces | Macros
assert.h File Reference
#include <stdexcept>

Go to the source code of this file.

Classes

class  tlz::failed_assertion
 

Namespaces

 tlz
 

Macros

#define MF_STRINGIZE_(X)   #X
 
#define MF_STRINGIZE(X)   MF_STRINGIZE_(X)
 
#define MF_GET_NARG_MACRO_2(_1, _2, NAME, ...)   NAME
 
#define MF_ASSERT_CRIT_MSG_(__condition__, __msg__)   if(! (__condition__)) throw ::tlz::failed_assertion(__msg__ " at " __FILE__ ":" MF_STRINGIZE(__LINE__))
 
#define MF_ASSERT_MSG_(__condition__, __msg__)   if(! (__condition__)) throw ::tlz::failed_assertion(__msg__ " at " __FILE__ ":" MF_STRINGIZE(__LINE__))
 
#define MF_ASSERT_(__condition__)   MF_ASSERT_MSG_(__condition__, "`" #__condition__ "`")
 
#define MF_ASSERT_CRIT_(__condition__)   MF_ASSERT_CRIT_MSG_(__condition__, "`" #__condition__ "`")
 
#define MF_ASSERT(...)   MF_GET_NARG_MACRO_2(__VA_ARGS__, MF_ASSERT_MSG_, MF_ASSERT_, IGNORE)(__VA_ARGS__)
 
#define MF_ASSERT_CRIT(...)   MF_GET_NARG_MACRO_2(__VA_ARGS__, MF_ASSERT_CRIT_MSG_, MF_ASSERT_CRIT_, IGNORE)(__VA_ARGS__)
 
#define Assert   MF_ASSERT
 
#define Assert_crit   MF_ASSERT_CRIT
 

Macro Definition Documentation

#define Assert   MF_ASSERT

Definition at line 40 of file assert.h.

#define Assert_crit   MF_ASSERT_CRIT

Definition at line 45 of file assert.h.

#define MF_ASSERT (   ...)    MF_GET_NARG_MACRO_2(__VA_ARGS__, MF_ASSERT_MSG_, MF_ASSERT_, IGNORE)(__VA_ARGS__)

Definition at line 33 of file assert.h.

#define MF_ASSERT_ (   __condition__)    MF_ASSERT_MSG_(__condition__, "`" #__condition__ "`")

Definition at line 24 of file assert.h.

#define MF_ASSERT_CRIT (   ...)    MF_GET_NARG_MACRO_2(__VA_ARGS__, MF_ASSERT_CRIT_MSG_, MF_ASSERT_CRIT_, IGNORE)(__VA_ARGS__)

Definition at line 34 of file assert.h.

#define MF_ASSERT_CRIT_ (   __condition__)    MF_ASSERT_CRIT_MSG_(__condition__, "`" #__condition__ "`")

Definition at line 25 of file assert.h.

#define MF_ASSERT_CRIT_MSG_ (   __condition__,
  __msg__ 
)    if(! (__condition__)) throw ::tlz::failed_assertion(__msg__ " at " __FILE__ ":" MF_STRINGIZE(__LINE__))

Definition at line 12 of file assert.h.

#define MF_ASSERT_MSG_ (   __condition__,
  __msg__ 
)    if(! (__condition__)) throw ::tlz::failed_assertion(__msg__ " at " __FILE__ ":" MF_STRINGIZE(__LINE__))

Definition at line 14 of file assert.h.

#define MF_GET_NARG_MACRO_2 (   _1,
  _2,
  NAME,
  ... 
)    NAME

Definition at line 9 of file assert.h.

#define MF_STRINGIZE (   X)    MF_STRINGIZE_(X)

Definition at line 7 of file assert.h.

#define MF_STRINGIZE_ (   X)    #X

Definition at line 6 of file assert.h.