• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++98, c++03
11 
12 // <string_view>
13 
14 // Test that <string_view> provides all of the arithmetic, enum, and pointer
15 // hash specializations.
16 
17 #include <string_view>
18 
19 #include "poisoned_hash_helper.hpp"
20 
main()21 int main() {
22   test_library_hash_specializations_available();
23   {
24     test_hash_enabled_for_type<std::string_view>();
25     test_hash_enabled_for_type<std::wstring_view>();
26 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
27     test_hash_enabled_for_type<std::u16string_view>();
28     test_hash_enabled_for_type<std::u32string_view>();
29 #endif
30   }
31 }
32