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:
@@ -23,6 +23,8 @@
|
||||
#include <cassert>
|
||||
#include <type_traits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
using std::string_view;
|
||||
|
||||
template <class SV>
|
||||
@@ -36,6 +38,7 @@ test()
|
||||
typedef typename SV::value_type char_type;
|
||||
typedef std::basic_string<char_type> String;
|
||||
typedef std::hash<String> SH;
|
||||
ASSERT_NOEXCEPT(H()(SV()));
|
||||
|
||||
char_type g1 [ 10 ];
|
||||
char_type g2 [ 10 ];
|
||||
|
||||
Reference in New Issue
Block a user