]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix constraints on std::optional converting assignments [PR117858]
authorJonathan Wakely <jwakely@redhat.com>
Sat, 30 Nov 2024 21:37:02 +0000 (21:37 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 30 Nov 2024 21:39:17 +0000 (21:39 +0000)
commitc2c7d71eeeab7c6e2a8124b53d6eae6c59781e79
tree9474ce057d32bc1d38e51d6e2478aadbc1cb77ec
parent91f4550e1700b7fcc15baa37cbcd517cc02dc975
libstdc++: Fix constraints on std::optional converting assignments [PR117858]

It looks like I copied these constraints from operator=(U&&) and didn't
correct them to account for the parameter being optional<U> not U.

libstdc++-v3/ChangeLog:

PR libstdc++/117858
* include/std/optional (operator=(const optional<U>&)): Fix copy
and paste error in constraints.
(operator=(optional<U>&&)): Likewise.
* testsuite/20_util/optional/assignment/117858.cc: New test.
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc [new file with mode: 0644]