libstdc++: Remove constraints from std::optional monadic ops [PR102863]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 Oct 2021 00:19:45 +0000 (01:19 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 21 Oct 2021 00:23:22 +0000 (01:23 +0100)
commit0fac85a24f40ef6098b756e8e8655205f4bfbf3e
tree0460446bcc7e06ff2559b7452dfcf9709ec1e46e
parent674dda6be01990c2def9bd7a41d53ec996e8b0ed
libstdc++: Remove constraints from std::optional monadic ops [PR102863]

The constraints on transform and and_then can cause errors when checking
satisfaction. The constraints that were present in R6 of the paper were
moved for he final F8 revision, and so should have been included in the
implementation.

libstdc++-v3/ChangeLog:

PR libstdc++/102863
* include/std/optional (optional::and_then, optional::transform):
Remove requires-clause.
* testsuite/20_util/optional/monadic/and_then.cc: Check
overload resolution doesn't cause errors.
* testsuite/20_util/optional/monadic/transform.cc: Likewise.
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc
libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc