]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/src/locale-inst.cc
localefwd.h (class locale): Add static member _S_num_extra_categories...
[gcc.git] / libstdc++-v3 / src / locale-inst.cc
CommitLineData
b2dad0e3
BK
1// Locale support -*- C++ -*-
2
4b9aaf63 3// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
b2dad0e3
BK
4//
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 2, or (at your option)
9// any later version.
10
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.
15
16// You should have received a copy of the GNU General Public License along
17// with this library; see the file COPYING. If not, write to the Free
18// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19// USA.
20
21// As a special exception, you may use this file as part of a free software
22// library without restriction. Specifically, if other files instantiate
23// templates or use macros or inline functions from this file, or you compile
24// this file and link it with other files to produce an executable, this
25// file does not by itself cause the resulting executable to be covered by
26// the GNU General Public License. This exception does not however
27// invalidate any other reasons why the executable file might be covered by
28// the GNU General Public License.
29
30//
31// ISO C++ 14882: 22.1 Locales
32//
33
54c1bf78
BK
34#include <cstdlib>
35#include <clocale>
36#include <cstring>
37#include <cassert>
54c1bf78 38#include <locale>
b2dad0e3 39
d53d7f6e
PE
40namespace std
41{
b2dad0e3 42 // moneypunct, money_get, and money_put
b2dad0e3
BK
43 template class moneypunct<char, false>;
44 template class moneypunct<char, true>;
45 template class moneypunct_byname<char, false>;
46 template class moneypunct_byname<char, true>;
41b4d44b
BK
47 template class money_get<char, istreambuf_iterator<char> >;
48 template class money_put<char, ostreambuf_iterator<char> >;
b2dad0e3
BK
49
50#ifdef _GLIBCPP_USE_WCHAR_T
51 template class moneypunct<wchar_t, false>;
52 template class moneypunct<wchar_t, true>;
53 template class moneypunct_byname<wchar_t, false>;
54 template class moneypunct_byname<wchar_t, true>;
41b4d44b
BK
55 template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
56 template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
b2dad0e3
BK
57#endif
58
59 // numpunct, numpunct_byname, num_get, and num_put
60 template class numpunct<char>;
61 template class numpunct_byname<char>;
41b4d44b
BK
62 template class num_get<char, istreambuf_iterator<char> >;
63 template class num_put<char, ostreambuf_iterator<char> >;
86ade44c 64 template
41b4d44b
BK
65 ostreambuf_iterator<char>
66 num_put<char, ostreambuf_iterator<char> >::
67 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
68 long) const;
86ade44c
BK
69
70 template
41b4d44b
BK
71 ostreambuf_iterator<char>
72 num_put<char, ostreambuf_iterator<char> >::
73 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
86ade44c
BK
74 unsigned long) const;
75
76#ifdef _GLIBCPP_USE_LONG_LONG
77 template
41b4d44b
BK
78 ostreambuf_iterator<char>
79 num_put<char, ostreambuf_iterator<char> >::
80 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
86ade44c
BK
81 long long) const;
82
83 template
41b4d44b
BK
84 ostreambuf_iterator<char>
85 num_put<char, ostreambuf_iterator<char> >::
86 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
86ade44c
BK
87 unsigned long long) const;
88#endif
89
90 template
41b4d44b
BK
91 ostreambuf_iterator<char>
92 num_put<char, ostreambuf_iterator<char> >::
93 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
94 double) const;
86ade44c
BK
95
96 template
41b4d44b
BK
97 ostreambuf_iterator<char>
98 num_put<char, ostreambuf_iterator<char> >::
99 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
86ade44c
BK
100 long double) const;
101
b2dad0e3
BK
102#ifdef _GLIBCPP_USE_WCHAR_T
103 template class numpunct<wchar_t>;
104 template class numpunct_byname<wchar_t>;
41b4d44b
BK
105 template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
106 template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
86ade44c
BK
107
108 template
41b4d44b
BK
109 ostreambuf_iterator<wchar_t>
110 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
111 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
112 char, long) const;
86ade44c
BK
113
114 template
41b4d44b
BK
115 ostreambuf_iterator<wchar_t>
116 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
117 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
118 char, unsigned long) const;
86ade44c
BK
119
120#ifdef _GLIBCPP_USE_LONG_LONG
121 template
41b4d44b
BK
122 ostreambuf_iterator<wchar_t>
123 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
124 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
125 char, long long) const;
86ade44c
BK
126
127 template
41b4d44b
BK
128 ostreambuf_iterator<wchar_t>
129 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
130 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
131 char, unsigned long long) const;
86ade44c
BK
132#endif
133
134 template
41b4d44b
BK
135 ostreambuf_iterator<wchar_t>
136 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
137 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
86ade44c
BK
138 double) const;
139
140 template
41b4d44b
BK
141 ostreambuf_iterator<wchar_t>
142 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
143 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
86ade44c 144 long double) const;
b2dad0e3
BK
145#endif
146
b2dad0e3 147 // time_get and time_put
e08138aa 148 template class __timepunct<char>;
41b4d44b
BK
149 template class time_put<char, ostreambuf_iterator<char> >;
150 template class time_put_byname<char, ostreambuf_iterator<char> >;
151 template class time_get<char, istreambuf_iterator<char> >;
152 template class time_get_byname<char, istreambuf_iterator<char> >;
8bc603ee 153
b2dad0e3 154#ifdef _GLIBCPP_USE_WCHAR_T
e08138aa 155 template class __timepunct<wchar_t>;
41b4d44b
BK
156 template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
157 template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
158 template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
159 template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
b2dad0e3
BK
160#endif
161
162 // messages
b2dad0e3
BK
163 template class messages<char>;
164 template class messages_byname<char>;
165#ifdef _GLIBCPP_USE_WCHAR_T
b2dad0e3
BK
166 template class messages<wchar_t>;
167 template class messages_byname<wchar_t>;
168#endif
169
170 // ctype
a32e3c09 171 inline template class __ctype_abstract_base<char>;
b2dad0e3 172 template class ctype_byname<char>;
b2dad0e3 173#ifdef _GLIBCPP_USE_WCHAR_T
a32e3c09 174 inline template class __ctype_abstract_base<wchar_t>;
b2dad0e3 175 template class ctype_byname<wchar_t>;
b2dad0e3
BK
176#endif
177
63511623 178 // codecvt
a32e3c09 179 inline template class __codecvt_abstract_base<char, char, mbstate_t>;
167ed88f
BK
180 template class codecvt_byname<char, char, mbstate_t>;
181#ifdef _GLIBCPP_USE_WCHAR_T
3522a91b 182 inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
167ed88f
BK
183 template class codecvt_byname<wchar_t, char, mbstate_t>;
184#endif
63511623 185
b2dad0e3 186 // collate
0214010c 187 template class collate<char>;
b2dad0e3 188 template class collate_byname<char>;
b2dad0e3 189#ifdef _GLIBCPP_USE_WCHAR_T
0214010c 190 template class collate<wchar_t>;
b2dad0e3 191 template class collate_byname<wchar_t>;
b2dad0e3
BK
192#endif
193
194 // use_facet
41b4d44b 195 // NB: use_facet<ctype> is specialized
b2dad0e3
BK
196 template
197 const codecvt<char, char, mbstate_t>&
a5834d1b 198 use_facet<codecvt<char, char, mbstate_t> >(const locale&);
e08138aa 199
72ed2836
BK
200 template
201 const collate<char>&
202 use_facet<collate<char> >(const locale&);
e08138aa 203
41b4d44b
BK
204 template
205 const numpunct<char>&
206 use_facet<numpunct<char> >(const locale&);
207
208 template
209 const num_put<char>&
210 use_facet<num_put<char> >(const locale&);
211
212 template
213 const num_get<char>&
214 use_facet<num_get<char> >(const locale&);
215
69971cd8
BK
216 template
217 const moneypunct<char, true>&
218 use_facet<moneypunct<char, true> >(const locale&);
e08138aa 219
69971cd8
BK
220 template
221 const moneypunct<char, false>&
222 use_facet<moneypunct<char, false> >(const locale&);
e08138aa 223
41b4d44b
BK
224 template
225 const money_put<char>&
226 use_facet<money_put<char> >(const locale&);
227
228 template
229 const money_get<char>&
230 use_facet<money_get<char> >(const locale&);
231
e08138aa
BK
232 template
233 const __timepunct<char>&
234 use_facet<__timepunct<char> >(const locale&);
235
41b4d44b
BK
236 template
237 const time_put<char>&
238 use_facet<time_put<char> >(const locale&);
e08138aa 239
b2dad0e3 240 template
41b4d44b
BK
241 const time_get<char>&
242 use_facet<time_get<char> >(const locale&);
e08138aa 243
b2dad0e3 244 template
41b4d44b
BK
245 const messages<char>&
246 use_facet<messages<char> >(const locale&);
e08138aa 247
41b4d44b 248#ifdef _GLIBCPP_USE_WCHAR_T
b2dad0e3
BK
249 template
250 const codecvt<wchar_t, char, mbstate_t>&
72ed2836 251 use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
e08138aa 252
72ed2836
BK
253 template
254 const collate<wchar_t>&
255 use_facet<collate<wchar_t> >(const locale&);
e08138aa 256
41b4d44b
BK
257 template
258 const numpunct<wchar_t>&
259 use_facet<numpunct<wchar_t> >(const locale&);
260
261 template
262 const num_put<wchar_t>&
263 use_facet<num_put<wchar_t> >(const locale&);
264
265 template
266 const num_get<wchar_t>&
267 use_facet<num_get<wchar_t> >(const locale&);
268
69971cd8
BK
269 template
270 const moneypunct<wchar_t, true>&
271 use_facet<moneypunct<wchar_t, true> >(const locale&);
e08138aa 272
69971cd8
BK
273 template
274 const moneypunct<wchar_t, false>&
275 use_facet<moneypunct<wchar_t, false> >(const locale&);
41b4d44b
BK
276
277 template
278 const money_put<wchar_t>&
279 use_facet<money_put<wchar_t> >(const locale&);
280
281 template
282 const money_get<wchar_t>&
283 use_facet<money_get<wchar_t> >(const locale&);
e08138aa
BK
284
285 template
286 const __timepunct<wchar_t>&
287 use_facet<__timepunct<wchar_t> >(const locale&);
41b4d44b
BK
288
289 template
290 const time_put<wchar_t>&
291 use_facet<time_put<wchar_t> >(const locale&);
292
293 template
294 const time_get<wchar_t>&
295 use_facet<time_get<wchar_t> >(const locale&);
296
297 template
298 const messages<wchar_t>&
299 use_facet<messages<wchar_t> >(const locale&);
b2dad0e3
BK
300#endif
301
302 // has_facet
41b4d44b
BK
303 template
304 bool
305 has_facet<ctype<char> >(const locale&);
306
307 template
308 bool
309 has_facet<codecvt<char, char, mbstate_t> >(const locale&);
310
311 template
312 bool
313 has_facet<collate<char> >(const locale&);
314
b2dad0e3
BK
315 template
316 bool
bfa1e6b1 317 has_facet<numpunct<char> >(const locale&);
41b4d44b 318
bfa1e6b1
BK
319 template
320 bool
321 has_facet<num_put<char> >(const locale&);
41b4d44b 322
bfa1e6b1
BK
323 template
324 bool
325 has_facet<num_get<char> >(const locale&);
41b4d44b 326
bfa1e6b1
BK
327 template
328 bool
41b4d44b
BK
329 has_facet<moneypunct<char> >(const locale&);
330
331 template
332 bool
333 has_facet<money_put<char> >(const locale&);
334
335 template
336 bool
337 has_facet<money_get<char> >(const locale&);
338
339 template
340 bool
341 has_facet<__timepunct<char> >(const locale&);
342
343 template
344 bool
345 has_facet<time_put<char> >(const locale&);
346
347 template
348 bool
349 has_facet<time_get<char> >(const locale&);
350
351 template
352 bool
353 has_facet<messages<char> >(const locale&);
bfa1e6b1 354
b2dad0e3 355#ifdef _GLIBCPP_USE_WCHAR_T
41b4d44b
BK
356 template
357 bool
358 has_facet<ctype<wchar_t> >(const locale&);
359
360 template
361 bool
362 has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
363
364 template
365 bool
366 has_facet<collate<wchar_t> >(const locale&);
367
b2dad0e3
BK
368 template
369 bool
bfa1e6b1 370 has_facet<numpunct<wchar_t> >(const locale&);
41b4d44b 371
bfa1e6b1
BK
372 template
373 bool
374 has_facet<num_put<wchar_t> >(const locale&);
41b4d44b 375
bfa1e6b1
BK
376 template
377 bool
378 has_facet<num_get<wchar_t> >(const locale&);
41b4d44b 379
bfa1e6b1
BK
380 template
381 bool
41b4d44b 382 has_facet<moneypunct<wchar_t> >(const locale&);
b2dad0e3 383
b2dad0e3 384 template
41b4d44b
BK
385 bool
386 has_facet<money_put<wchar_t> >(const locale&);
387
02a480f1 388 template
41b4d44b
BK
389 bool
390 has_facet<money_get<wchar_t> >(const locale&);
02a480f1 391
41b4d44b
BK
392 template
393 bool
394 has_facet<__timepunct<wchar_t> >(const locale&);
b2dad0e3 395
41b4d44b
BK
396 template
397 bool
398 has_facet<time_put<wchar_t> >(const locale&);
b2dad0e3 399
41b4d44b
BK
400 template
401 bool
402 has_facet<time_get<wchar_t> >(const locale&);
b2dad0e3 403
b2dad0e3
BK
404 template
405 bool
41b4d44b
BK
406 has_facet<messages<wchar_t> >(const locale&);
407#endif
408
41b4d44b 409 // locale
b2dad0e3
BK
410 template
411 char*
86ade44c 412 __add_grouping<char>(char*, char, char const*, char const*,
72ed2836 413 char const*, char const*);
b2dad0e3 414
fb678854
BK
415 template
416 bool
417 __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
418
f13a69ec 419 template class __pad<char, char_traits<char> >;
b2dad0e3
BK
420
421#ifdef _GLIBCPP_USE_WCHAR_T
b2dad0e3
BK
422 template
423 wchar_t*
86ade44c 424 __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
72ed2836 425 wchar_t const*, wchar_t const*);
fb678854
BK
426 template
427 bool
428 __verify_grouping<wchar_t>(const basic_string<wchar_t>&,
429 basic_string<wchar_t>&);
b2dad0e3 430
f13a69ec
BK
431 template class __pad<wchar_t, char_traits<wchar_t> >;
432#endif
b2dad0e3 433
4b9aaf63
BK
434 template
435 int
f13a69ec
BK
436 __convert_from_v(char*, const int, const char*, double,
437 const __c_locale&, int);
4b9aaf63
BK
438
439 template
440 int
f13a69ec
BK
441 __convert_from_v(char*, const int, const char*, long double,
442 const __c_locale&, int);
4b9aaf63
BK
443
444 template
445 int
f13a69ec
BK
446 __convert_from_v(char*, const int, const char*, long,
447 const __c_locale&, int);
4b9aaf63
BK
448
449 template
450 int
6d8e16a4 451 __convert_from_v(char*, const int, const char*, unsigned long,
4b9aaf63
BK
452 const __c_locale&, int);
453
454 template
455 int
f13a69ec
BK
456 __convert_from_v(char*, const int, const char*, long long,
457 const __c_locale&, int);
4b9aaf63
BK
458
459 template
460 int
6d8e16a4 461 __convert_from_v(char*, const int, const char*, unsigned long long,
4b9aaf63 462 const __c_locale&, int);
d53d7f6e 463} // namespace std
This page took 0.26488 seconds and 5 git commands to generate.