]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
1 // { dg-require-namedlocale "de_DE" }
3 // Copyright (C) 2011-2014 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>
23 #define mychar __gnu_cxx::character<unsigned short, int>
27 template<> codecvt
<mychar
, char, mbstate_t>::~codecvt()
31 codecvt
<mychar
, char, mbstate_t>::result
32 codecvt
<mychar
, char, mbstate_t>::
33 do_out(state_type
&, const intern_type
*, const intern_type
*,
34 const intern_type
*&, extern_type
*, extern_type
*,
36 { return codecvt_base::ok
; }
39 codecvt
<mychar
, char, mbstate_t>::result
40 codecvt
<mychar
, char, mbstate_t>::
41 do_in(state_type
&, const extern_type
*, const extern_type
*,
42 const extern_type
*&, intern_type
*, intern_type
*,
44 { return codecvt_base::ok
; }
47 codecvt
<mychar
, char, mbstate_t>::result
48 codecvt
<mychar
, char, mbstate_t>::
49 do_unshift(state_type
&, extern_type
*, extern_type
*,
55 codecvt
<mychar
, char, mbstate_t>::do_encoding() const
60 codecvt
<mychar
, char, mbstate_t>::do_always_noconv() const
65 codecvt
<mychar
, char, mbstate_t>::
66 do_length(state_type
&, const extern_type
*, const extern_type
*,
72 codecvt
<mychar
, char, mbstate_t>::do_max_length() const
82 locale
loc(locale::classic(),
83 new codecvt
<mychar
, char, mbstate_t>());
86 locale
loc2(locale::classic(),
87 new codecvt_byname
<mychar
, char, mbstate_t>("de_DE"));