summaryrefslogtreecommitdiffabout
path: root/include/opkele/debug.h
Side-by-side diff
Diffstat (limited to 'include/opkele/debug.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/debug.h17
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 @@
+#ifndef __OPKELE_DEBUG_H
+#define __OPKELE_DEBUG_H
+
+#ifdef NDEBUG
+
+#define D_(x) ((void)0)
+#define DOUT_(x) ((void)0)
+
+#else /* NDEBUG */
+
+#define D_(x) x
+#include <iostream>
+#define DOUT_(x) std::clog << x << std::endl
+
+#endif /* NDEBUG */
+
+#endif /* __OPKELE_DEBUG_H */