]> git.lyx.org Git - lyx.git/blobdiff - src/support/debugstream.h
* lyxfunctional.h: delete compare_memfun and helper classes
[lyx.git] / src / support / debugstream.h
index b4f32cba7739d469f33e51124a437d3d924c07f5..c41d4d94b175988c6c2dfff91fe5e68ca6e45fe4 100644 (file)
 
 #include <boost/test/detail/nullstream.hpp>
 
+#ifdef DEBUG
+# define TEMPORARY_DEBUG_MACRO DEBUG
+# undef DEBUG
+#endif
+
 struct debug_trait {
        enum type {
                NONE   = 0,
@@ -35,6 +40,11 @@ struct debug_trait {
        }
 };
 
+#ifdef TEMPORARY_DEBUG_MACRO
+# define DEBUG TEMPORARY_DEBUG_MACRO
+# undef TEMPORARY_DEBUG_MACRO
+#endif
+
 
 template <class dtrait,
          class charT = char,
@@ -44,6 +54,10 @@ public:
        typedef dtrait debug;
        typedef typename debug::type Type;
 
+       basic_debugstream()
+               : std::basic_ostream<charT, traits>(0), dt(debug::NONE)
+       {}
+
        /// Constructor, sets the debug level to t.
        explicit basic_debugstream(std::basic_streambuf<charT, traits> * buf)
                : std::basic_ostream<charT, traits>(buf), dt(debug::NONE)