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 // static constexpr char_type to_char_type(int_type c);
20 #include "test_macros.h"
24 #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
25 assert(std::char_traits<char8_t>::to_char_type(u8'a') == u8'a');
26 assert(std::char_traits<char8_t>::to_char_type(u8'A') == u8'A');
27 assert(std::char_traits<char8_t>::to_char_type(0) == 0);