PR libstdc++/85184 remove debug assertions from std::variant
authorJonathan Wakely <jwakely@redhat.com>
Wed, 3 Apr 2019 09:47:51 +0000 (10:47 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 3 Apr 2019 09:47:51 +0000 (10:47 +0100)
commit59e36c85e7e627feb458f2b8c43859d9422f1522
treec9e555e153c6ca34b885ee8aafe25593ef8321d3
parent0cb78ef4bcd216413199f9f27eed0ea0a56dd8da
PR libstdc++/85184 remove debug assertions from std::variant

The __glibcxx_assert macro should be used to check preconditions that
users must meet, not to check postconditions that the implementation
must meet. We have tests to verify std::variant meets its
postconditions, users shouldn't pay for those checks at runtime.

PR libstdc++/85184
* include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
Remove assertions.
(variant::emplace<_Tp>): Remove result of emplace<N> directly.

From-SVN: r270117
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/variant