Go to the source code of this file.
|
| Gray |
| < The main namespace for all Core functions.
|
|
|
typedef | Gray::bool (CALLBACK AssertCallback_t)(const char *pszExp |
|
A very simple header for basic support of asserts.
- Copyright
- 1992 - 2020 Dennis Robinson (http://www.menasoft.com)
◆ ASSERT
◆ ASSERT_N
◆ ASSERT_THROW
#define ASSERT_THROW |
( |
|
exp | ) |
if (!(exp)) { ::Gray::cDebugAssert::Assert_Throw(#exp, DEBUGSOURCELINE ); } |
◆ DEBUG_ASSERT
#define DEBUG_ASSERT |
( |
|
exp, |
|
|
|
sDesc |
|
) |
| __noop |
◆ DEBUG_CHECK
#define DEBUG_CHECK |
( |
|
exp | ) |
__noop |
◆ DEBUGSOURCELINE
record the file and line this macro is used on.
FILE is valid for GNUC and _MSC_VER. ?? Should we get rid of this if !(defined(_DEBUG) || defined(_DEBUG_FAST))
◆ STATIC_ASSERT
#define STATIC_ASSERT |
( |
|
exp, |
|
|
|
name |
|
) |
| typedef int static_assert_##name [(exp) ? 1 : -1] |
static_assert = compile time assert. evaluates as a constant at compile time. like BOOST_STATIC_ASSERT
- Note
- : Takes a NON string name argument to support old compilers.