libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 9 Apr 2021 11:05:39 +0000 (12:05 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 9 Apr 2021 12:09:24 +0000 (13:09 +0100)
commit40ccb47b505b528244ee305923681c0ae3b6f4d5
tree62953d42d3a187906e35d20d2dbd0f09760efb26
parent72ddd861d3881eba141c41c1ccbb4e8b3be159a5
libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985]

I keep forgetting that a constexpr function in C++11 has to be a single
return statement.

libstdc++-v3/ChangeLog:

PR libstdc++/99985
* include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
to be a valid constexpr function in C++11.
* testsuite/23_containers/unordered_set/cons/99985.cc: New test.
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_set/cons/99985.cc [new file with mode: 0644]