// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* const @p operator<< functions. For the
* reason why they, in turn, need to be
* @p const, see there.
+ *
+ * Now, we would like to make the
+ * variable a reference, but then the C++
+ * standard says that 'mutable' can't be
+ * applied to reference members.
*/
- mutable std::ostream &output_stream;
+ mutable std::ostream *output_stream;
/**
* Stores the actual condition
ConditionalOStream::operator<< (const T& t) const
{
if (active_flag == true)
- output_stream << t;
+ *output_stream << t;
return *this;
}
ConditionalOStream::operator<< (std::ostream& (*p) (std::ostream&)) const
{
if (active_flag == true)
- output_stream << p;
+ *output_stream << p;
return *this;
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
ConditionalOStream::ConditionalOStream(std::ostream &stream,
const bool active)
:
- output_stream (stream),
+ output_stream (&stream),
active_flag(active)
{}