[PATCH] libstdc++: std::variant with multiple identical types assignment fail to compile [PR91807]

Ville Voutilainen ville.voutilainen@gmail.com
Wed Jul 1 18:09:56 GMT 2020


On Wed, 1 Jul 2020 at 20:46, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
>
> Looks like just a small thinko. We construct a temporary and move-construct
> from it, but we should construct the temporary with the right index.
>
> OK for trunk and gcc-10 if full tests pass?
>
> 2020-07-01  Ville Voutilainen  <ville.voutilainen@gmail.com>
>
>     PR libstdc++/91807
>     * include/std/variant
>     (_Copy_assign_base::operator=(const _Copy_assign_base&):
>     Do the move-construction from a temporary so that the temporary
>     is constructed with an explicit index.
>     * testsuite/20_util/variant/91807.cc: New.

And sure, s/move-construction/move-assignment/.


More information about the Libstdc++ mailing list