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 // <string>
11
12 // template<> struct char_traits<char16_t>
13
14 // typedef char16_t char_type;
15 // typedef uint_least16_t int_type;
16 // typedef streamoff off_type;
17 // typedef u16streampos pos_type;
18 // typedef mbstate_t state_type;
19
20 #include <string>
21 #include <type_traits>
22 #include <cstdint>
23
main()24 int main()
25 {
26 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
27 static_assert((std::is_same<std::char_traits<char16_t>::char_type, char16_t>::value), "");
28 static_assert((std::is_same<std::char_traits<char16_t>::int_type, std::uint_least16_t>::value), "");
29 static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), "");
30 static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), "");
31 static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), "");
32 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
33 }
34