1 //===----------------------------------------------------------------------===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <locale> 10 11 // template <> class codecvt<wchar_t, char, mbstate_t> 12 13 // int max_length() const throw(); 14 15 // XFAIL: libcpp-has-no-wide-characters 16 17 #include <locale> 18 #include <cassert> 19 20 #include "test_macros.h" 21 22 typedef std::codecvt<wchar_t, char, std::mbstate_t> F; 23 main(int,char **)24int main(int, char**) 25 { 26 std::locale l = std::locale::classic(); 27 const F& f = std::use_facet<F>(l); 28 assert(f.max_length() == 1); 29 30 return 0; 31 } 32