This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: basic_streambuf<> and copying
> 50. Copy constructor and assignment operator of ios_base
> (trying to figure out if ios_base is copy-able)
I can't quite understand the LWG comment on this issue: Since
basic_ios is not copyable, how could you use a copyable ios_base?
> That being said, with all the pointers in basic_streambuf, we are left
> with two options:
>
> 1) it may indeed be wise to make the assignment operators/copy ctor
> private, which would prohibit copying and is not conformant to the standard.
>
> 2) make deep copies, no matter how painful this.
There is a third option: Decide that it is an omission in the
standard, make the copy ctor private and unimplemented, and raise it
as a library issue.
If that issue gets resolved the other way 'round (i.e. by deciding
that copying of streambufs is meaningful), one can still make the copy
ctors public.
Regards,
Martin