10 #include <forward_list>
17 #include <unordered_map>
20 #include "../meta/platform.h"
33 std::string
demangle(
const char* name);
39 const char* name =
typeid(T).name();
68 #define __func__ __FUNCTION__
71 #define REGISTER_ASSERT {\
72 std::stringstream ss; \
73 ss << __FILE__ << ":" << __LINE__ << " in " << __func__ << "()"; \
74 carl::last_assertion_string = ss.str(); \
75 carl::last_assertion_code = __LINE__; \
77 #define UNREGISTER_ASSERT {\
78 carl::last_assertion_string = ""; \
79 carl::last_assertion_code = 23; \
81 #define REGISTERED_ASSERT(condition) REGISTER_ASSERT; assert(condition); UNREGISTER_ASSERT
84 #define REGISTER_ASSERT
85 #define UNREGISTER_ASSERT
86 #define REGISTERED_ASSERT(condition)
carl is the main namespace for the library.
std::string callingFunction()
std::string demangle(const char *name)
int last_assertion_code
Stores an integer representation of the last assertion that was registered via REGISTER_ASSERT.
void printStacktrace()
Uses GDB to print a stack trace.
std::string last_assertion_string
Stores a textual representation of the last assertion that was registered via REGISTER_ASSERT.