From a9a17196ad5f9540a40a4c53ffb844397c32bf85 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 10 Sep 1998 09:16:14 +0000 Subject: [PATCH] Reinvent a bug fix I thought was not needed any more. git-svn-id: https://svn.dealii.org/trunk@599 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/logstream.h | 17 +++++++++++++++-- deal.II/base/source/log.cc | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index 55f94809a0..0bf65b5b6c 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -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 ---------------------------*/ + diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index 58584d70ae..6707f31f2b 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -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:"); -- 2.39.5