[PATCH] libstdc++: std::variant with multiple identical types assignment fail to compile [PR91807]
Ville Voutilainen
ville.voutilainen@gmail.com
Wed Jul 1 17:46:45 GMT 2020
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr91807.diff
Type: text/x-patch
Size: 1830 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200701/2db0c811/attachment.bin>
More information about the Libstdc++
mailing list