any (any::_Storage): Make non-copyable.
authorJonathan Wakely <jwakely@redhat.com>
Sat, 2 May 2015 12:38:44 +0000 (13:38 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 2 May 2015 12:38:44 +0000 (13:38 +0100)
commit9407c6fa534498ea87bbd6640cc212016779cd52
treec80d0cd99b2fbf4638ebafad68b347ebb363b39b
parent5b244a78dc61f1461882f1a751b047ea81a8c2d5
any (any::_Storage): Make non-copyable.

* include/experimental/any (any::_Storage): Make non-copyable.
(any::any): Do not copy _Storage object.
(any::operator=): Implement more efficiently than swapping.
(any::swap): Use new _Op_xfer operation.
(any::_Op::_Op_xfer): New enumerator.
(_Manager_internal::_S_alloc): Remove unused function.
(_Manager_internal::_S_create, _Manager_external::_S_create): Use out
parameter instead of returning a _Storage object.
(_Manager_internal::_S_manage, _Manager_external::_S_manage): Add
_Op_xfer operation for moving and swapping.
* testsuite/experimental/any/cons/nontrivial.cc: New.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.

From-SVN: r222721
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/any
libstdc++-v3/testsuite/experimental/any/cons/nontrivial.cc [new file with mode: 0644]
libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc