Helper macros for debugging.
More...
#include <iostream>
Go to the source code of this file.
Helper macros for debugging.
- Author
- Oliver Lemke
- Date
- 2013-04-25
Definition in file debug.h.
◆ DEBUG_COUNTER
#define DEBUG_COUNTER |
( |
|
n | ) |
|
Value: { \
std::cerr << "DBG: " << #n << ": " << ++n << std::endl; \
}
Definition at line 40 of file debug.h.
◆ DEBUG_ONLY
#define DEBUG_ONLY |
( |
|
... | ) |
__VA_ARGS__ |
◆ DEBUG_PRINT
#define DEBUG_PRINT |
( |
|
e | ) |
{ std::cerr << "DBG: " << (e) << std::endl; } |
◆ DEBUG_VAR
#define DEBUG_VAR |
( |
|
e | ) |
{ std::cerr << "DBG: " << #e << ": " << (e) << std::endl; } |
◆ DEBUG_VAR_FLT
#define DEBUG_VAR_FLT |
( |
|
p, |
|
|
|
e |
|
) |
| |
Value: { \
std::streamsize old_p = std::cerr.precision(); \
std::cerr << "DBG: " << #e << ": " << std::setprecision(p) << (e) \
<< std::endl \
<< std::setprecision(old_p); \
}
Definition at line 55 of file debug.h.