aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@gmail.com>2016-10-11 01:08:58 +0300
committerVille Voutilainen <ville@gcc.gnu.org>2016-10-11 01:08:58 +0300
commit1725d05d199fc256844040d2900d5ee206c9d289 (patch)
treec60362f3d076a1ba42ebcccf84d7b65f06bfa9e1 /gcc/go
parent496f8eead85efa20e9b17bca6039dde2b46f08c4 (diff)
downloadgcc-1725d05d199fc256844040d2900d5ee206c9d289.zip
gcc-1725d05d199fc256844040d2900d5ee206c9d289.tar.gz
gcc-1725d05d199fc256844040d2900d5ee206c9d289.tar.bz2
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. From-SVN: r240951
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions