]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reinvent a bug fix I thought was not needed any more.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 10 Sep 1998 09:16:14 +0000 (09:16 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 10 Sep 1998 09:16:14 +0000 (09:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@599 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/logstream.h
deal.II/base/source/log.cc

index 55f94809a0d33c2878abc12db81ebb2e6e8185df..0bf65b5b6c7f16c344258523c967624ef3f465eb 100644 (file)
@@ -40,7 +40,7 @@ class LogStream
                                      * to #cerr#, but can be set to another
                                      * stream through the constructor.
                                      */
-    ostream  &std;
+    ostream  *std;
 
                                     /**
                                      * Pointer to a stream, where a copy of
@@ -156,6 +156,18 @@ class LogStream
                                      * Declare this function as a friend.
                                      */
     friend void endl (LogStream &);
+
+                                    /**
+                                     * Kludge to make one of the egcs snapshots
+                                     * happy, since it produces an internal
+                                     * compiler error when accessing #s.std#.
+                                     * Remove this function at the first
+                                     * possible time.
+                                     */
+    ostream & get_std_stream () {
+      return *std;
+    };
+    
 };
 
 
@@ -171,7 +183,7 @@ writestuff(LogStream& s, const T& t)
                                   // print the object #t# to each of the
                                   // two streams, if necessary
   if (s.prefixes.size() <= s.std_depth)
-    s.std << t;
+    s.get_std_stream() << t;
 
   if (s.file && (s.prefixes.size() <= s.file_depth))
     *(s.file) << t;
@@ -233,3 +245,4 @@ extern LogStream deallog;
 /* end of #ifndef __logstream_H */
 #endif
 /*----------------------------   logstream.h     ---------------------------*/
+
index 58584d70ae179df054c25472160859e986444674..6707f31f2bcb671fc7bd36cd88fe5c512664c5ac 100644 (file)
@@ -7,7 +7,7 @@ LogStream deallog;
 
 
 LogStream::LogStream()
-               : std(cerr), file(0), was_endl(true),
+               : std(&cerr), file(0), was_endl(true),
                  std_depth(10000), file_depth(10000)
 {
   prefixes.push("DEAL:");

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.