Make any's copy assignment operator exception-safe,
commit75ad30d8b3e840c6f4b9cbbc7230c89155f897ce
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Oct 2016 22:08:58 +0000 (10 22:08 +0000)
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Oct 2016 22:08:58 +0000 (10 22:08 +0000)
treec60362f3d076a1ba42ebcccf84d7b65f06bfa9e1
parent1e7515ddf390e3bb9036c88eb5b729d14b6b2a6f
Make any's copy assignment operator exception-safe,
don't copy the underlying value when any is moved,
make in_place constructors explicit.
* include/std/any (any(in_place_type_t<_ValueType>, _Args&&...)):
Make explicit.
(any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...)):
Likewise.
(operator=(const any&)): Make strongly exception-safe.
(operator=(any&&)): reset() unconditionally in the case where
rhs has a value.
(operator=(_ValueType&&)): Indent the return type.
(_Manager_internal<_Tp>::_S_manage): Move in _Op_xfer, don't copy.
* testsuite/20_util/any/assign/2.cc: Adjust.
* testsuite/20_util/any/assign/exception.cc: New.
* testsuite/20_util/any/cons/2.cc: Adjust.
* testsuite/20_util/any/cons/explicit.cc: New.
* testsuite/20_util/any/misc/any_cast_neg.cc: Ajust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240951 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/any
libstdc++-v3/testsuite/20_util/any/assign/2.cc
libstdc++-v3/testsuite/20_util/any/assign/exception.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/any/cons/2.cc
libstdc++-v3/testsuite/20_util/any/cons/explicit.cc [copied from libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc with 73% similarity]
libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc