Implement P0599: 'noexcept for hash functions'. Fix a couple of hash functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2017-03-23 02:40:28 +00:00
parent 03096267d6
commit af552ba05a
18 changed files with 69 additions and 30 deletions

View File

@@ -29,6 +29,7 @@ test(int i)
typedef std::hash<T> H;
static_assert((std::is_same<H::argument_type, T>::value), "" );
static_assert((std::is_same<H::result_type, std::size_t>::value), "" );
ASSERT_NOEXCEPT(H()(T()));
H h;
T ec(i, std::system_category());
const std::size_t result = h(ec);