1 // Locale support -*- C++ -*-
3 // Copyright (C) 1999-2017 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 // Instantiate constructor taking __cxx11::string
197 template time_put_byname
<C
>::time_put_byname(const string
&, size_t);
199 _GLIBCXX_BEGIN_NAMESPACE_CXX11
200 template class time_get
<C
, istreambuf_iterator
<C
> >;
201 template class time_get_byname
<C
, istreambuf_iterator
<C
> >;
202 _GLIBCXX_END_NAMESPACE_CXX11
205 _GLIBCXX_BEGIN_NAMESPACE_CXX11
206 template class messages
<C
>;
207 template class messages_byname
<C
>;
208 _GLIBCXX_END_NAMESPACE_CXX11
211 ctype_byname
<C
>::ctype_byname(const string
& __s
, size_t __refs
)
212 : ctype_byname(__s
.c_str(), __refs
) { }
214 #if ! _GLIBCXX_USE_CXX11_ABI
215 inline template class __ctype_abstract_base
<C
>;
216 template class ctype_byname
<C
>;
220 #if ! _GLIBCXX_USE_CXX11_ABI
221 inline template class __codecvt_abstract_base
<C
, char, mbstate_t>;
222 template class codecvt_byname
<C
, char, mbstate_t>;
224 // Instantiate constructor taking __cxx11::string
225 template codecvt_byname
<C
, char, mbstate_t>::codecvt_byname(const string
&, size_t);
229 _GLIBCXX_BEGIN_NAMESPACE_CXX11
230 template class collate
<C
>;
231 template class collate_byname
<C
>;
232 _GLIBCXX_END_NAMESPACE_CXX11
235 #if ! _GLIBCXX_USE_CXX11_ABI
238 use_facet
<ctype
<C
> >(const locale
&);
241 const codecvt
<C
, char, mbstate_t>&
242 use_facet
<codecvt
<C
, char, mbstate_t> >(const locale
&);
247 use_facet
<collate
<C
> >(const locale
&);
251 use_facet
<numpunct
<C
> >(const locale
&);
253 #if ! _GLIBCXX_USE_CXX11_ABI
256 use_facet
<num_put
<C
> >(const locale
&);
260 use_facet
<num_get
<C
> >(const locale
&);
264 const moneypunct
<C
, true>&
265 use_facet
<moneypunct
<C
, true> >(const locale
&);
268 const moneypunct
<C
, false>&
269 use_facet
<moneypunct
<C
, false> >(const locale
&);
273 use_facet
<money_put
<C
> >(const locale
&);
277 use_facet
<money_get
<C
> >(const locale
&);
279 #if ! _GLIBCXX_USE_CXX11_ABI
281 const __timepunct
<C
>&
282 use_facet
<__timepunct
<C
> >(const locale
&);
286 use_facet
<time_put
<C
> >(const locale
&);
291 use_facet
<time_get
<C
> >(const locale
&);
295 use_facet
<messages
<C
> >(const locale
&);
298 #if ! _GLIBCXX_USE_CXX11_ABI
301 has_facet
<ctype
<C
> >(const locale
&);
305 has_facet
<codecvt
<C
, char, mbstate_t> >(const locale
&);
310 has_facet
<collate
<C
> >(const locale
&);
314 has_facet
<numpunct
<C
> >(const locale
&);
316 #if ! _GLIBCXX_USE_CXX11_ABI
319 has_facet
<num_put
<C
> >(const locale
&);
323 has_facet
<num_get
<C
> >(const locale
&);
328 has_facet
<moneypunct
<C
> >(const locale
&);
332 has_facet
<money_put
<C
> >(const locale
&);
336 has_facet
<money_get
<C
> >(const locale
&);
338 #if ! _GLIBCXX_USE_CXX11_ABI
341 has_facet
<__timepunct
<C
> >(const locale
&);
345 has_facet
<time_put
<C
> >(const locale
&);
350 has_facet
<time_get
<C
> >(const locale
&);
354 has_facet
<messages
<C
> >(const locale
&);
357 #if ! _GLIBCXX_USE_CXX11_ABI
361 __add_grouping
<C
>(C
*, C
, char const*, size_t,
364 template class __pad
<C
, char_traits
<C
> >;
368 __int_to_char(C
*, unsigned long, const C
*,
369 ios_base::fmtflags
, bool);
371 #ifdef _GLIBCXX_USE_LONG_LONG
374 __int_to_char(C
*, unsigned long long, const C
*,
375 ios_base::fmtflags
, bool);
379 _GLIBCXX_END_NAMESPACE_VERSION
382 // XXX GLIBCXX_ABI Deprecated
383 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char \
384 && _GLIBCXX_USE_CXX11_ABI == 0
386 #pragma GCC diagnostic ignored "-Wattribute-alias"
388 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
389 extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
391 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
392 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
393 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
394 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
395 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
396 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
397 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
398 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
399 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
400 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
401 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_
,
402 _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_
);
403 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_
,
404 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
);
405 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_
,
406 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_
);
407 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_
,
408 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_
);
409 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_
,
410 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_
);
411 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_
,
412 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_
);
413 _GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_
,
414 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_
);
415 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs
,
416 _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs
);
417 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs
,
418 _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs
);
419 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs
,
420 _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs
);
421 _GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs
,
422 _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs
);
424 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT