1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
13 // template<> struct char_traits<char8_t>
15 // typedef char8_t char_type;
16 // typedef unsigned int int_type;
17 // typedef streamoff off_type;
18 // typedef u16streampos pos_type;
19 // typedef mbstate_t state_type;
22 #include <type_traits>
27 #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
28 static_assert((std::is_same<std::char_traits<char8_t>::char_type, char8_t>::value), "");
29 static_assert((std::is_same<std::char_traits<char8_t>::int_type, unsigned int>::value), "");
30 static_assert((std::is_same<std::char_traits<char8_t>::off_type, std::streamoff>::value), "");
31 static_assert((std::is_same<std::char_traits<char8_t>::pos_type, std::u16streampos>::value), "");
32 static_assert((std::is_same<std::char_traits<char8_t>::state_type, std::mbstate_t>::value), "");