]> git.lyx.org Git - lyx.git/blobdiff - src/support/DebugStream.h
Various fixes look at ChangeLog
[lyx.git] / src / support / DebugStream.h
index cdf5e0841a5098f4aed917064455edb7dc2a9fdb..946f7173afefdc74ae2341f66597d32aabbb7089 100644 (file)
 #ifndef DEBUGSTREAM_H
 #define DEBUGSTREAM_H
 
-#ifdef _STANDARD_C_PLUS_PLUS
-#define MODERN_STL
-#endif
-
-#ifdef MODERN_STL
-#include <ostream>
-#else
 #include <iostream>
-#endif
 
 #ifdef TEST_DEBUGSTREAM
 #include <string>
@@ -90,10 +82,10 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-class DebugStream : public std::ostream {
+class DebugStream : public ostream {
 public:
        /// Constructor, sets the debug level to t.
-       DebugStream(Debug::type t = Debug::NONE);
+       explicit DebugStream(Debug::type t = Debug::NONE);
        
        /// Constructor, sets the log file to f, and the debug level to t.
        DebugStream(char const * f, Debug::type t = Debug::NONE);
@@ -136,7 +128,7 @@ public:
            current debug level otherwise the real debug stream
            is used.
        */
-       std::ostream & debug(Debug::type t = Debug::ANY) {
+       ostream & debug(Debug::type t = Debug::ANY) {
                if (dt & t) return *this;
                return nullstream;
        }
@@ -145,14 +137,14 @@ public:
        /** This is an operator to give a more convenient use:
            dbgstream[Debug::INFO] << "Info!\n";
        */
-       std::ostream & operator[](Debug::type t) {
+       ostream & operator[](Debug::type t) {
                return debug(t);
        }
 private:
        /// The current debug level
        Debug::type dt;
        /// The no-op stream.
-       std::ostream nullstream;
+       ostream nullstream;
        struct debugstream_internal;
        debugstream_internal * internal;
 };