https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100982
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:b06478ca4142ca204133351da45691c787314f64 commit r9-9637-gb06478ca4142ca204133351da45691c787314f64 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Jun 9 11:03:15 2021 +0100 libstdc++: Fix constraint on std::optional assignment [PR 100982] libstdc++-v3/ChangeLog: PR libstdc++/100982 * include/std/optional (optional::operator=(const optional<U>&)): Fix value category used in is_assignable check. * testsuite/20_util/optional/assignment/100982.cc: New test. (cherry picked from commit b3fce1bd45f72cc9e55fb7431762e92e30fefcf1)