[PATCH] PR libstdc++/85184 remove debug assertions from std::variant

Ville Voutilainen ville.voutilainen@gmail.com
Wed Apr 3 10:04:00 GMT 2019


On Wed, 3 Apr 2019 at 12:48, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> 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.
>
> Tested powerpc64le-linux, committed to trunk.

The latter changelog entry should say "Return resulf of emplace<N>
directly", not "Remove result...".



More information about the Libstdc++ mailing list