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 // <codecvt> 10 11 // template <class Elem, unsigned long Maxcode = 0x10ffff, 12 // codecvt_mode Mode = (codecvt_mode)0> 13 // class codecvt_utf8 14 // : public codecvt<Elem, char, mbstate_t> 15 // { 16 // // unspecified 17 // }; 18 19 // int encoding() const throw(); 20 21 #include <codecvt> 22 #include <cassert> 23 24 #include "test_macros.h" 25 26 int main(int, char**) 27 { 28 { 29 typedef std::codecvt_utf8<wchar_t> C; 30 C c; 31 int r = c.encoding(); 32 assert(r == 0); 33 } 34 { 35 typedef std::codecvt_utf8<char16_t> C; 36 C c; 37 int r = c.encoding(); 38 assert(r == 0); 39 } 40 { 41 typedef std::codecvt_utf8<char32_t> C; 42 C c; 43 int r = c.encoding(); 44 assert(r == 0); 45 } 46 47 return 0; 48 } 49