blob: e6f3d53a84e12c3ef610bb0ede6dbcbb6780e31d [file] [log] [blame]
Eric Fiselierf9127592017-01-21 00:02:12 +00001//===----------------------------------------------------------------------===//
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>
13
14// Test that <string> provides all of the arithmetic, enum, and pointer
15// hash specializations.
16
17#include <string>
18
19#include "poisoned_hash_helper.hpp"
20
21int main() {
22 test_library_hash_specializations_available();
23 {
24 test_hash_enabled_for_type<std::string>();
25 test_hash_enabled_for_type<std::wstring>();
Marshall Clow7dad0bd2018-12-11 04:35:44 +000026#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
27 test_hash_enabled_for_type<std::u8string>();
28#endif
Eric Fiselierf9127592017-01-21 00:02:12 +000029#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
30 test_hash_enabled_for_type<std::u16string>();
31 test_hash_enabled_for_type<std::u32string>();
32#endif
33 }
34}