// -*- C++ -*-
/**
- * \file debugStream.h
+ * \file debugstream.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
#ifndef DEBUG_STREAM_HPP
#define DEBUG_STREAM_HPP
-#include <boost/test/detail/nullstream.hpp>
+#include <iostream>
+#include <boost/version.hpp>
+
+
+//namespace lyx {
+
+#if BOOST_VERSION < 103300
+# include <boost/test/detail/nullstream.hpp>
+#else
+# include <boost/test/utils/nullstream.hpp>
+#endif
+
+#ifdef DEBUG
+# define TEMPORARY_DEBUG_MACRO DEBUG
+# undef DEBUG
+#endif
struct debug_trait {
enum type {
}
};
+#ifdef TEMPORARY_DEBUG_MACRO
+# define DEBUG TEMPORARY_DEBUG_MACRO
+# undef TEMPORARY_DEBUG_MACRO
+#endif
+
template <class dtrait,
class charT = char,
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)
typedef basic_debugstream<debug_trait> debugstream;
+
+//} // namespace lyx
+
#endif