]> git.lyx.org Git - lyx.git/blobdiff - src/support/DebugStream.h
noncopyable + read ChangeLog
[lyx.git] / src / support / DebugStream.h
index 323b9edc73e9caadda7a093c5ba7f2679a05c0c8..703bbdf4fbeb2b344e030137e1d64dc13054df13 100644 (file)
 #ifndef DEBUGSTREAM_H
 #define DEBUGSTREAM_H
 
-#include <iostream>
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "LOstream.h"
 
 #ifdef TEST_DEBUGSTREAM
 #include <string>
@@ -82,12 +86,22 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-class DebugStream : public std::ostream {
+
+// This workaround is needed only for gcc 2.8.1 (and possibly egcs
+// 1.0.x), which generates a compiler error when subclassing from
+// std::. (JMarc)
+#ifdef CXX_WORKING_NAMESPACES
+class DebugStream : public std::ostream
+#else
+class DebugStream : public ostream
+#endif
+{
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
        
        /// Constructor, sets the log file to f, and the debug level to t.
+       explicit
        DebugStream(char const * f, Debug::type t = Debug::NONE);
 
        ///