https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91807
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Ville Voutilainen <vi...@gcc.gnu.org>: https://gcc.gnu.org/g:9cba1b9a6333dcc6623865b7a0ed4d57cec4088e commit r10-8418-g9cba1b9a6333dcc6623865b7a0ed4d57cec4088e Author: Ville Voutilainen <ville.voutilai...@gmail.com> Date: Thu Jul 2 22:16:39 2020 +0300 PR libstdc++/91807 PR libstdc++/91807 * include/std/variant (_Copy_assign_base::operator=(const _Copy_assign_base&): Do the move-assignment from a temporary so that the temporary is constructed with an explicit index. * testsuite/20_util/variant/91807.cc: New. (cherry picked from commit dbca7a69f276e4829354f87f2747ebff36f6090e)