Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2003-05-29 09:30:50

On Thursday, May 29, 2003, at 12:29 AM, Daryle Walker wrote:

> I'm trying to fix up the I/O library submission I gave a few months
> ago, and came up with an issue with a copy constructor and GCC. I
> explicitly wrote a copy constructor for a new stream-buffer class
> template. I just added test code that used that constructor.
> Everything ran fine on my Metrowerks compiler, but Project Builder
> (which uses GCC) choked.
> One of the reasons was that GCC made the basic_streambuf class
> template noncopyable. It referred to a DR # 50. The standard
> currently has streambuf copying unspecified (in the normal-life sense,
> not the C++ sense), so it should automatically be copyable. My code
> took advantage of that. The copying isn't too useful, especially
> since streams are explicitly noncopyable. Should I just remove that
> code?

I'm not aware of anything in the standard, or in the defects list
(including #50) that says a std::basic_streambuf is not copyable.

DR 50 states that ios_base is not copyable. And it is true that
Metrowerks currently allows ios_base to be copied. The semantics of
this support basic_ios::copyfmt. And non-copyability is introduced at
the basic_ios level.


Boost list run by bdawes at, gregod at, cpdaniel at, john at