Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // UNSUPPORTED: c++98, c++03 |
| 10 | |
| 11 | // <string> |
| 12 | |
| 13 | // Test that <string> provides all of the arithmetic, enum, and pointer |
| 14 | // hash specializations. |
| 15 | |
| 16 | #include <string> |
| 17 | |
| 18 | #include "poisoned_hash_helper.hpp" |
| 19 | |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 20 | int main(int, char**) { |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 21 | test_library_hash_specializations_available(); |
| 22 | { |
| 23 | test_hash_enabled_for_type<std::string>(); |
| 24 | test_hash_enabled_for_type<std::wstring>(); |
Marshall Clow | 7dad0bd | 2018-12-11 04:35:44 +0000 | [diff] [blame] | 25 | #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L |
| 26 | test_hash_enabled_for_type<std::u8string>(); |
| 27 | #endif |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 28 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS |
| 29 | test_hash_enabled_for_type<std::u16string>(); |
| 30 | test_hash_enabled_for_type<std::u32string>(); |
| 31 | #endif |
| 32 | } |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 33 | |
| 34 | return 0; |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 35 | } |