mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-30 13:31:20 +00:00
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
llvm-svn: 298573
This commit is contained in:
1 parent
6974dd6412
commit
7c803385a7
18 files changed
+69
-30
No files matched your search
@@ -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