PR libstdc++/83658 fix exception-safety in std::any::emplace
authorJonathan Wakely <jwakely@redhat.com>
Mon, 29 Jan 2018 12:33:32 +0000 (12:33 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 29 Jan 2018 12:33:32 +0000 (12:33 +0000)
commit73ebece382667f8b2d999676ba77bfd66eb2d9cd
treea079e590c2a734aab467f5fcf75a53220fff903a
parent27837e0c35badaa19b418d460c0cf69012bc9f07
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.

From-SVN: r257141
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]