On 08/04/21 17:50 +0100, Jonathan Wakely wrote: >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. > I keep forgetting that a constexpr function in C++11 has to be a single return statement. I'm testing this patch now and will push to trunk and backport to the branches where I already backported the breakage (facepalm).