aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-03-29 22:43:16 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-03-30 00:06:25 +0100
commitce39714a1ce58f2f32e8a44a224061290670db0f (patch)
tree21ee802f1873e9477a934b390ec5899992865c46 /gcc/range-op-float.cc
parent31a909712014b75fc6ae2ca5eaa425f218bb5f32 (diff)
downloadgcc-ce39714a1ce58f2f32e8a44a224061290670db0f.zip
gcc-ce39714a1ce58f2f32e8a44a224061290670db0f.tar.gz
gcc-ce39714a1ce58f2f32e8a44a224061290670db0f.tar.bz2
libstdc++: Apply small fix from LWG 3843 to std::expected
LWG 3843 adds some type requirements to std::expected::value to ensure that it can correctly copy the error value if it needs to throw an exception. We don't need to do anything to enforce that, because it will already be ill-formed if the type can't be copied. The issue also makes a small drive-by fix to ensure that a const E& is copied from the non-const value()& overload, which this change implements. libstdc++-v3/ChangeLog: * include/std/expected (expected::value() &): Use const lvalue for unex member passed to bad_expected_access constructor, as per LWG 3843.
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions