aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-04-08 16:29:11 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-04-08 17:49:59 +0100
commit1cbba49e3417d9b0661e70301d6fb7a7f52fd360 (patch)
treecc43d05bb09fce4267b812c770fe6160b11113c7 /libphobos
parent59d09f9fe4bcf4a341494220be377dfe13d84c1e (diff)
downloadgcc-1cbba49e3417d9b0661e70301d6fb7a7f52fd360.zip
gcc-1cbba49e3417d9b0661e70301d6fb7a7f52fd360.tar.gz
gcc-1cbba49e3417d9b0661e70301d6fb7a7f52fd360.tar.bz2
libstdc++: Simplify noexcept-specifiers for move constructors
This puts the logic for the noexcept-specifier in one place, and then reuses it elsewhere. This means checking whether the move constructor can throw doesn't need to do overload resolution and then check whether some other constructor can throw, we just get the answer directly. libstdc++-v3/ChangeLog: * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): New function to determine noexcept-specifier for move constructors. (_Hashtable): Use _S_nothrow_move() on move constructors. * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc: Correct static assertion message. * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc: Likewise. * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc: Likewise. * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc: Likewise.
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions