1 // Locale support -*- C++ -*-
3 // Copyright (C) 1999-2015 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.1 Locales
29 #ifndef _GLIBCXX_USE_CXX11_ABI
30 // Instantiations in this file use the old COW std::string ABI unless included
31 // by another file which defines _GLIBCXX_USE_CXX11_ABI=1. Some instantiations
32 // are guarded by a check for !_GLIBCXX_USE_CXX11_ABI so that they are only
33 // instantiated once, because they are not tagged with abi_tag so should not
34 // be instantiated twice.
35 # define _GLIBCXX_USE_CXX11_ABI 0
40 // Instantiation configuration.
46 namespace std
_GLIBCXX_VISIBILITY(default)
48 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 // moneypunct, money_get, and money_put
51 #if ! _GLIBCXX_USE_CXX11_ABI
52 template struct __moneypunct_cache
<C
, false>;
53 template struct __moneypunct_cache
<C
, true>;
55 _GLIBCXX_BEGIN_NAMESPACE_CXX11
56 template class moneypunct
<C
, false>;
57 template class moneypunct
<C
, true>;
58 template class moneypunct_byname
<C
, false>;
59 template class moneypunct_byname
<C
, true>;
60 _GLIBCXX_END_NAMESPACE_CXX11
61 _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
62 template class money_get
<C
, istreambuf_iterator
<C
> >;
63 template class money_put
<C
, ostreambuf_iterator
<C
> >;
65 istreambuf_iterator
<C
>
66 money_get
<C
, istreambuf_iterator
<C
> >::
67 _M_extract
<true>(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
68 ios_base
&, ios_base::iostate
&, string
&) const;
71 istreambuf_iterator
<C
>
72 money_get
<C
, istreambuf_iterator
<C
> >::
73 _M_extract
<false>(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
74 ios_base
&, ios_base::iostate
&, string
&) const;
77 ostreambuf_iterator
<C
>
78 money_put
<C
, ostreambuf_iterator
<C
> >::
79 _M_insert
<true>(ostreambuf_iterator
<C
>, ios_base
&, C
,
80 const string_type
&) const;
83 ostreambuf_iterator
<C
>
84 money_put
<C
, ostreambuf_iterator
<C
> >::
85 _M_insert
<false>(ostreambuf_iterator
<C
>, ios_base
&, C
,
86 const string_type
&) const;
87 _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
89 // numpunct, numpunct_byname, num_get, and num_put
90 #if ! _GLIBCXX_USE_CXX11_ABI
91 template struct __numpunct_cache
<C
>;
93 _GLIBCXX_BEGIN_NAMESPACE_CXX11
94 template class numpunct
<C
>;
95 template class numpunct_byname
<C
>;
96 _GLIBCXX_END_NAMESPACE_CXX11
97 _GLIBCXX_BEGIN_NAMESPACE_LDBL
98 #if ! _GLIBCXX_USE_CXX11_ABI
99 template class num_get
<C
, istreambuf_iterator
<C
> >;
103 istreambuf_iterator
<C
>
104 num_get
<C
, istreambuf_iterator
<C
> >::
105 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
106 ios_base
&, ios_base::iostate
&,
110 istreambuf_iterator
<C
>
111 num_get
<C
, istreambuf_iterator
<C
> >::
112 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
113 ios_base
&, ios_base::iostate
&,
114 unsigned short&) const;
117 istreambuf_iterator
<C
>
118 num_get
<C
, istreambuf_iterator
<C
> >::
119 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
120 ios_base
&, ios_base::iostate
&,
121 unsigned int&) const;
124 istreambuf_iterator
<C
>
125 num_get
<C
, istreambuf_iterator
<C
> >::
126 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
127 ios_base
&, ios_base::iostate
&,
128 unsigned long&) const;
130 #ifdef _GLIBCXX_USE_LONG_LONG
132 istreambuf_iterator
<C
>
133 num_get
<C
, istreambuf_iterator
<C
> >::
134 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
135 ios_base
&, ios_base::iostate
&,
139 istreambuf_iterator
<C
>
140 num_get
<C
, istreambuf_iterator
<C
> >::
141 _M_extract_int(istreambuf_iterator
<C
>, istreambuf_iterator
<C
>,
142 ios_base
&, ios_base::iostate
&,
143 unsigned long long&) const;
146 #if ! _GLIBCXX_USE_CXX11_ABI
147 template class num_put
<C
, ostreambuf_iterator
<C
> >;
150 ostreambuf_iterator
<C
>
151 num_put
<C
, ostreambuf_iterator
<C
> >::
152 _M_insert_int(ostreambuf_iterator
<C
>, ios_base
&, C
,
156 ostreambuf_iterator
<C
>
157 num_put
<C
, ostreambuf_iterator
<C
> >::
158 _M_insert_int(ostreambuf_iterator
<C
>, ios_base
&, C
,
159 unsigned long) const;
161 #ifdef _GLIBCXX_USE_LONG_LONG
163 ostreambuf_iterator
<C
>
164 num_put
<C
, ostreambuf_iterator
<C
> >::
165 _M_insert_int(ostreambuf_iterator
<C
>, ios_base
&, C
,
169 ostreambuf_iterator
<C
>
170 num_put
<C
, ostreambuf_iterator
<C
> >::
171 _M_insert_int(ostreambuf_iterator
<C
>, ios_base
&, C
,
172 unsigned long long) const;
176 ostreambuf_iterator
<C
>
177 num_put
<C
, ostreambuf_iterator
<C
> >::
178 _M_insert_float(ostreambuf_iterator
<C
>, ios_base
&, C
, char,
182 ostreambuf_iterator
<C
>
183 num_put
<C
, ostreambuf_iterator
<C
> >::
184 _M_insert_float(ostreambuf_iterator
<C
>, ios_base
&, C
, char,
187 _GLIBCXX_END_NAMESPACE_LDBL
189 // time_get and time_put
190 #if ! _GLIBCXX_USE_CXX11_ABI
191 template class __timepunct
<C
>;
192 template struct __timepunct_cache
<C
>;
193 template class time_put
<C
, ostreambuf_iterator
<C
> >;
194 template class time_put_byname
<C
, ostreambuf_iterator
<C
> >;
196 _GLIBCXX_BEGIN_NAMESPACE_CXX11
197 template class time_get
<C
, istreambuf_iterator
<C
> >;
198 template class time_get_byname
<C
, istreambuf_iterator
<C
> >;
199 _GLIBCXX_END_NAMESPACE_CXX11
202 _GLIBCXX_BEGIN_NAMESPACE_CXX11
203 template class messages
<C
>;
204 template class messages_byname
<C
>;
205 _GLIBCXX_END_NAMESPACE_CXX11
208 #if ! _GLIBCXX_USE_CXX11_ABI
209 inline template class __ctype_abstract_base
<C
>;
210 template class ctype_byname
<C
>;
214 #if ! _GLIBCXX_USE_CXX11_ABI
215 inline template class __codecvt_abstract_base
<C
, char, mbstate_t>;
216 template class codecvt_byname
<C
, char, mbstate_t>;
220 _GLIBCXX_BEGIN_NAMESPACE_CXX11
221 template class collate
<C
>;
222 template class collate_byname
<C
>;
223 _GLIBCXX_END_NAMESPACE_CXX11
226 #if ! _GLIBCXX_USE_CXX11_ABI
229 use_facet
<ctype
<C
> >(const locale
&);
232 const codecvt
<C
, char, mbstate_t>&
233 use_facet
<codecvt
<C
, char, mbstate_t> >(const locale
&);
238 use_facet
<collate
<C
> >(const locale
&);
242 use_facet
<numpunct
<C
> >(const locale
&);
244 #if ! _GLIBCXX_USE_CXX11_ABI
247 use_facet
<num_put
<C
> >(const locale
&);
251 use_facet
<num_get
<C
> >(const locale
&);
255 const moneypunct
<C
, true>&
256 use_facet
<moneypunct
<C
, true> >(const locale
&);
259 const moneypunct
<C
, false>&
260 use_facet
<moneypunct
<C
, false> >(const locale
&);
264 use_facet
<money_put
<C
> >(const locale
&);
268 use_facet
<money_get
<C
> >(const locale
&);
270 #if ! _GLIBCXX_USE_CXX11_ABI
272 const __timepunct
<C
>&
273 use_facet
<__timepunct
<C
> >(const locale
&);
277 use_facet
<time_put
<C
> >(const locale
&);
282 use_facet
<time_get
<C
> >(const locale
&);
286 use_facet
<messages
<C
> >(const locale
&);
289 #if ! _GLIBCXX_USE_CXX11_ABI
292 has_facet
<ctype
<C
> >(const locale
&);
296 has_facet
<codecvt
<C
, char, mbstate_t> >(const locale
&);
301 has_facet
<collate
<C
> >(const locale
&);
305 has_facet
<numpunct
<C
> >(const locale
&);
307 #if ! _GLIBCXX_USE_CXX11_ABI
310 has_facet
<num_put
<C
> >(const locale
&);
314 has_facet
<num_get
<C
> >(const locale
&);
319 has_facet
<moneypunct
<C
> >(const locale
&);
323 has_facet
<money_put
<C
> >(const locale
&);
327 has_facet
<money_get
<C
> >(const locale
&);
329 #if ! _GLIBCXX_USE_CXX11_ABI
332 has_facet
<__timepunct
<C
> >(const locale
&);
336 has_facet
<time_put
<C
> >(const locale
&);
341 has_facet
<time_get
<C
> >(const locale
&);
345 has_facet
<messages
<C
> >(const locale
&);
348 #if ! _GLIBCXX_USE_CXX11_ABI
352 __add_grouping
<C
>(C
*, C
, char const*, size_t,
355 template class __pad
<C
, char_traits
<C
> >;
359 __int_to_char(C
*, unsigned long, const C
*,
360 ios_base::fmtflags
, bool);
362 #ifdef _GLIBCXX_USE_LONG_LONG
365 __int_to_char(C
*, unsigned long long, const C
*,
366 ios_base::fmtflags
, bool);
370 _GLIBCXX_END_NAMESPACE_VERSION
373 // XXX GLIBCXX_ABI Deprecated
374 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char \
375 && _GLIBCXX_USE_CXX11_ABI == 0
377 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
378 extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
380 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
381 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
382 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
383 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
384 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
385 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
386 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
387 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
388 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
389 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
390 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
391 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
392 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_
,
393 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
);
394 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_
,
395 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_
);
396 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_
,
397 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_
);
398 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_
,
399 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_
);
400 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_
,
401 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_
);
402 _GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_
,
403 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_
);
404 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs
,
405 _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs
);
406 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs
,
407 _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs
);
408 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs
,
409 _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs
);
410 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs
,
411 _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs
);
413 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT