|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Conditional tracing macros for debugging. More...
#include <iostream>Go to the source code of this file.
Macros | |
| #define | AH_TRACE_JOIN_(a, b) a ## b |
| #define | AH_TRACE_JOIN(a, b) AH_TRACE_JOIN_(a, b) |
| #define | AH_TRACE_ONCE AH_TRACE_JOIN(ah_trace_once_, __LINE__) |
| #define | ah_trace_unless(out, C) |
| #define | ah_trace_if(out, C) |
| #define | ah_msg(out) out << "" |
| #define | ah_msg_if(out, C) |
| #define | ah_msg_unless(out, C) |
Conditional tracing macros for debugging.
Provides ah_trace_unless and ah_trace_if macros that output file:line information when conditions are met. Useful for debugging without full assertion overhead.
Each conditional macro is a for of one iteration, which takes no else: an else written after an invocation belongs to the if around it, and one with no if around it does not compile. Its condition is evaluated once, and it converts to bool as that of an if does, so a scoped enumeration does not; it must be an expression, not a declaration as in if (auto e = f()).
Definition in file ah-trace.H.
Definition at line 73 of file ah-trace.H.
| #define ah_msg_if | ( | out, | |
| C | |||
| ) |
Definition at line 76 of file ah-trace.H.
| #define ah_msg_unless | ( | out, | |
| C | |||
| ) |
Definition at line 81 of file ah-trace.H.
| #define ah_trace_if | ( | out, | |
| C | |||
| ) |
Definition at line 68 of file ah-trace.H.
| #define AH_TRACE_JOIN | ( | a, | |
| b | |||
| ) | AH_TRACE_JOIN_(a, b) |
Definition at line 60 of file ah-trace.H.
| #define AH_TRACE_JOIN_ | ( | a, | |
| b | |||
| ) | a ## b |
Definition at line 59 of file ah-trace.H.
| #define AH_TRACE_ONCE AH_TRACE_JOIN(ah_trace_once_, __LINE__) |
Definition at line 61 of file ah-trace.H.
| #define ah_trace_unless | ( | out, | |
| C | |||
| ) |
Definition at line 63 of file ah-trace.H.