-rw-r--r-- | include/opkele/debug.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/opkele/debug.h b/include/opkele/debug.h new file mode 100644 index 0000000..a02f8d4 --- a/dev/null +++ b/include/opkele/debug.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef __OPKELE_DEBUG_H | ||
2 | #define __OPKELE_DEBUG_H | ||
3 | |||
4 | #ifdef NDEBUG | ||
5 | |||
6 | #define D_(x) ((void)0) | ||
7 | #define DOUT_(x)((void)0) | ||
8 | |||
9 | #else /* NDEBUG */ | ||
10 | |||
11 | #define D_(x) x | ||
12 | #include <iostream> | ||
13 | #define DOUT_(x)std::clog << x << std::endl | ||
14 | |||
15 | #endif /* NDEBUG */ | ||
16 | |||
17 | #endif /* __OPKELE_DEBUG_H */ | ||