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<char, char, mbstate_t> 12 13 // int max_length() const throw(); 14 15 #include <locale> 16 #include <cassert> 17 18 #include "test_macros.h" 19 20 typedef std::codecvt<char, char, std::mbstate_t> F; 21 main(int,char **)22int main(int, char**) 23 { 24 std::locale l = std::locale::classic(); 25 const F& f = std::use_facet<F>(l); 26 assert(f.max_length() == 1); 27 28 return 0; 29 } 30