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 //===----------------------------------------------------------------------===//
13 // class codecvt<wchar_t, char, mbstate_t>
14 // : public locale::facet,
15 // public codecvt_base
18 // typedef wchar_t intern_type;
19 // typedef char extern_type;
20 // typedef mbstate_t state_type;
25 #include <type_traits>
30 typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
31 static_assert((std::is_base_of<std::locale::facet, F>::value), "");
32 static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
33 static_assert((std::is_same<F::intern_type, wchar_t>::value), "");
34 static_assert((std::is_same<F::extern_type, char>::value), "");
35 static_assert((std::is_same<F::state_type, std::mbstate_t>::value), "");
36 std::locale l = std::locale::classic();
37 assert(std::has_facet<F>(l));
38 const F& f = std::use_facet<F>(l);
39 ((void)f); // Prevent unused warning