PR libstdc++/83658 fix exception-safety in std::any::emplace
commit1b861904d7c3dd39a56e332f696e46498370aaec
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jan 2018 12:33:32 +0000 (29 12:33 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jan 2018 12:33:32 +0000 (29 12:33 +0000)
treea079e590c2a734aab467f5fcf75a53220fff903a
parent25565afc008a77357dfb0de5e4a0eb42ccd7d0b2
PR libstdc++/83658 fix exception-safety in std::any::emplace

PR libstdc++/83658
* include/std/any (any::__do_emplace): Only set _M_manager after
constructing the contained object.
* testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
* testsuite/20_util/any/modifiers/83658.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257141 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/any
libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc
libstdc++-v3/testsuite/20_util/any/modifiers/83658.cc [new file with mode: 0644]