Implementation of custom assert and debug utilities.
Definition in file assert.hpp.
Go to the source code of this file.
Namespaces | |
mm | |
Root namespace for the whole library. | |
mm::assert_internal | |
Namespace holding custom assert implementation. | |
Macros | |
#define | prn(...) macro_dispatcher(prnv, __VA_ARGS__)(__VA_ARGS__) |
Prints a variable name and value to standard output. More... | |
#define | assert_msg(cond, ...) |
Assert with better error reporting. More... | |
Functions | |
bool | mm::assert_internal::assert_handler_implementation (const char *condition, const char *file, const char *func_name, int line, const char *message, tfm::FormatListRef format_list) |
Actual assert implementation. More... | |
template<typename... Args> | |
bool | mm::assert_internal::assert_handler (const char *condition, const char *file, const char *func_name, int line, const char *message, const Args &... args) |
Assert handler that unpacks varargs. More... | |
void | mm::print_red (const std::string &s) |
Prints given text in bold red. More... | |
void | mm::print_white (const std::string &s) |
Prints given text in bold white. More... | |
void | mm::print_green (const std::string &s) |
Prints given text in bold green. More... | |
#define assert_msg | ( | cond, | |
... | |||
) |
Assert with better error reporting.
cond | Conditions to test. |
... | The second parameter is also required and represents the message to print on failure. For every %* field in message one additional parameter must be present. |
Example:
Definition at line 75 of file assert.hpp.
#define prn | ( | ... | ) | macro_dispatcher(prnv, __VA_ARGS__)(__VA_ARGS__) |
Prints a variable name and value to standard output.
Can take one or two parameters. Example:
Definition at line 34 of file assert.hpp.