]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use std::remove_cv_t in std::optional::transform [PR109242]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 29 Mar 2023 21:16:55 +0000 (22:16 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 30 Mar 2023 08:07:53 +0000 (09:07 +0100)
commit82e8d1685a1e5fac4880e987ed9684248378bce2
tree0d95117bfc0d5a9db16f77b7db4c6ae54a332250
parent2fddea0fd2822135129118282d5814bc7880de57
libstdc++: Use std::remove_cv_t in std::optional::transform [PR109242]

We need to strip cv-qualifiers from the result of the callable passed to
std::optional::transform.

libstdc++-v3/ChangeLog:

PR libstdc++/109242
* include/std/optional (transform): Use std::remove_cv_t.
* testsuite/20_util/optional/monadic/pr109242.cc: New test.

(cherry picked from commit 31a909712014b75fc6ae2ca5eaa425f218bb5f32)
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc [new file with mode: 0644]