FeatStd Diagnostics
Debug Macros
The following macros can get overridden for custom needs:
- FEATSTD_DEBUG_BREAK
- FEATSTD_DEBUG_ASSERT
- FEATSTD_DEBUG_FAIL
- FEATSTD_DEBUG_REENTRANCE_GUARD
If these macros are not defined in custom header file the default implementation is taken, e.g. (code as in FeatStd/Diagnostics/Debug.h)
#if !defined(FEATSTD_DEBUG_ASSERT) // <-- allows to override in custom header file
#if defined(FEATSTD_DEBUG)
FEATSTD_LINT_MACRO_WHILEFALSE(FEATSTD_DEBUG_ASSERT)
#define FEATSTD_DEBUG_ASSERT(condition) \
do { \
if (!(condition)) { \
if (FeatStd::Diagnostics::DebugControl::Assert((#condition), \
__FILE__, __LINE__)) { \
FEATSTD_OS_BREAK(); \
} \
} \
FEATSTD_SUPPRESS_MSC_WARNING_FOR_NEXT_EXPRESSION(4127, while (false) accepted) \
} while (false)
#else
#define FEATSTD_DEBUG_ASSERT(condition)
#endif
#endif
- See also:
- Add custom config header file