]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
1 // { dg-require-namedlocale "de_DE.ISO8859-15" }
3 // Copyright (C) 2011-2023 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
21 #include <ext/pod_char_traits.h>
22 #include <testsuite_hooks.h>
24 #define mychar __gnu_cxx::character<unsigned short, int>
28 template<> codecvt
<mychar
, char, mbstate_t>::~codecvt()
32 codecvt
<mychar
, char, mbstate_t>::result
33 codecvt
<mychar
, char, mbstate_t>::
34 do_out(state_type
&, const intern_type
*, const intern_type
*,
35 const intern_type
*&, extern_type
*, extern_type
*,
37 { return codecvt_base::ok
; }
40 codecvt
<mychar
, char, mbstate_t>::result
41 codecvt
<mychar
, char, mbstate_t>::
42 do_in(state_type
&, const extern_type
*, const extern_type
*,
43 const extern_type
*&, intern_type
*, intern_type
*,
45 { return codecvt_base::ok
; }
48 codecvt
<mychar
, char, mbstate_t>::result
49 codecvt
<mychar
, char, mbstate_t>::
50 do_unshift(state_type
&, extern_type
*, extern_type
*,
56 codecvt
<mychar
, char, mbstate_t>::do_encoding() const throw()
61 codecvt
<mychar
, char, mbstate_t>::do_always_noconv() const throw()
66 codecvt
<mychar
, char, mbstate_t>::
67 do_length(state_type
&, const extern_type
*, const extern_type
*,
73 codecvt
<mychar
, char, mbstate_t>::do_max_length() const throw()
83 locale
loc(locale::classic(),
84 new codecvt
<mychar
, char, mbstate_t>());
87 locale
loc2(locale::classic(),
88 new codecvt_byname
<mychar
, char, mbstate_t>(ISO_8859(15,de_DE
)));