PR libstdc++/69608 Move semantics for strstreambuf
commit79d934a23b67fe3439729ec7f778707997e2d9e0
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 May 2018 16:25:44 +0000 (2 16:25 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 May 2018 16:25:44 +0000 (2 16:25 +0000)
treec33075a951b6f896c60ca570ab7134d33c8d292f
parent36f81fa896cf5cfedb277c3c88ccd0bdee3cef2d
PR libstdc++/69608 Move semantics for strstreambuf

In libstdc++ the deprecated char* streams are non-copyable, as was
required pre-C++11.

Since C++11 the standard implies that those streams should be copyable,
but doesn't specify the effects of copying them. This is surely a
defect, so for consistency with other implementations this change makes
them movable, but not copyable.

PR libstdc++/69608
* include/backward/strstream (strstreambuf): Define move constructor
and move assignment operator.
(istrstream, ostrstream, strstream): Likewise.
* testsuite/backward/strstream_move.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259842 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/backward/strstream
libstdc++-v3/testsuite/backward/strstream_move.cc [new file with mode: 0644]