]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/69608 Move semantics for strstreambuf
authorJonathan Wakely <jwakely@redhat.com>
Wed, 2 May 2018 16:25:44 +0000 (17:25 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 2 May 2018 16:25:44 +0000 (17:25 +0100)
commitc6d425797207908bb9468d79ac170c3f51c7a565
treec33075a951b6f896c60ca570ab7134d33c8d292f
parentd6476f90da4bfcb8644da32d3b4c4685a72bc84e
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.

From-SVN: r259842
libstdc++-v3/ChangeLog
libstdc++-v3/include/backward/strstream
libstdc++-v3/testsuite/backward/strstream_move.cc [new file with mode: 0644]