]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc
1 // Wrapper for underlying C-language localization -*- C++ -*-
3 // Copyright (C) 2001-2019 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 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
26 // ISO C++ 14882: 22.8 Standard locale categories.
29 // Written by Benjamin Kosnik <bkoz@redhat.com>
33 namespace std
_GLIBCXX_VISIBILITY(default)
36 locale::facet::_S_create_c_locale(__c_locale
&, const char*, __c_locale
*)
40 locale::facet::_S_destroy_c_locale(__c_locale
&)
44 locale::facet::_S_clone_c_locale(__c_locale
&) throw()
45 { return __c_locale(); }
49 numpunct
<char>::_M_initialize_numpunct(__c_locale
)
52 _M_decimal_point
= '.';
53 _M_thousands_sep
= ',';
56 _M_falsename
= "false";
59 #ifdef _GLIBCXX_USE_WCHAR_T
62 numpunct
<wchar_t>::_M_initialize_numpunct(__c_locale
)
65 _M_decimal_point
= L
'.';
66 _M_thousands_sep
= L
',';
68 _M_truename
= L
"true";
69 _M_falsename
= L
"false";
75 moneypunct
<char>::_M_initialize_moneypunct(__c_locale
)
78 _M_decimal_point
= '.';
79 _M_thousands_sep
= ',';
81 _M_curr_symbol
= string_type();
82 _M_positive_sign
= string_type();
83 _M_negative_sign
= string_type();
85 _M_pos_format
= money_base::_S_default_pattern
;
86 _M_neg_format
= money_base::_S_default_pattern
;
89 #ifdef _GLIBCXX_USE_WCHAR_T
92 moneypunct
<wchar_t>::_M_initialize_moneypunct(__c_locale
)
95 _M_decimal_point
= L
'.';
96 _M_thousands_sep
= L
',';
98 _M_curr_symbol
= string_type();
99 _M_positive_sign
= string_type();
100 _M_negative_sign
= string_type();
102 _M_pos_format
= money_base::_S_default_pattern
;
103 _M_neg_format
= money_base::_S_default_pattern
;