aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/version
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-12-16 16:07:29 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-12-16 20:58:09 +0000
commit59822c39207c9e8be576e9d6c3370bd85ddaf886 (patch)
tree5f1c1de4a706e68c52b8906bddc82bb43b92abe0 /libstdc++-v3/include/std/version
parent64c986b49558a7c356b85bda85195216936c29a3 (diff)
downloadgcc-59822c39207c9e8be576e9d6c3370bd85ddaf886.zip
gcc-59822c39207c9e8be576e9d6c3370bd85ddaf886.tar.gz
gcc-59822c39207c9e8be576e9d6c3370bd85ddaf886.tar.bz2
libstdc++: Fixes for std::expected
This fixes some bugs in the swap functions for std::expected. It also disables the noexcept-specifiers for equality operators, because those are problematic when querying whether a std::expected is equality comparable. The operator==(const expected<T,E>&, const U&) function is not constrained, so is viable for comparing expected<T,E> with expected<void,G>, but then we get an error from the noexcept-specifier. libstdc++-v3/ChangeLog: * include/std/expected (expected::_M_swap_val_unex): Guard the correct object. (expected::swap): Move is_swappable requirement from static_assert to constraint. (swap): Likewise. (operator==): Remove noexcept-specifier. * testsuite/20_util/expected/swap.cc: Check swapping of types without non-throwing move constructor. Check constraints on swap. * testsuite/20_util/expected/unexpected.cc: Check constraints on swap. * testsuite/20_util/expected/equality.cc: New test.
Diffstat (limited to 'libstdc++-v3/include/std/version')
0 files changed, 0 insertions, 0 deletions