]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/src/locale-inst.cc
locale-inst.cc: Do not include <cassert>.
[gcc.git] / libstdc++-v3 / src / locale-inst.cc
1 // Locale support -*- C++ -*-
2
3 // Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
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
34 #include <cstdlib>
35 #include <clocale>
36 #include <cstring>
37 #include <locale>
38
39 namespace std
40 {
41 // moneypunct, money_get, and money_put
42 template class moneypunct<char, false>;
43 template class moneypunct<char, true>;
44 template class moneypunct_byname<char, false>;
45 template class moneypunct_byname<char, true>;
46 template class money_get<char, istreambuf_iterator<char> >;
47 template class money_put<char, ostreambuf_iterator<char> >;
48
49 #ifdef _GLIBCPP_USE_WCHAR_T
50 template class moneypunct<wchar_t, false>;
51 template class moneypunct<wchar_t, true>;
52 template class moneypunct_byname<wchar_t, false>;
53 template class moneypunct_byname<wchar_t, true>;
54 template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
55 template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
56 #endif
57
58 // numpunct, numpunct_byname, num_get, and num_put
59 template class numpunct<char>;
60 template class numpunct_byname<char>;
61 template class num_get<char, istreambuf_iterator<char> >;
62 template class num_put<char, ostreambuf_iterator<char> >;
63 template
64 ostreambuf_iterator<char>
65 num_put<char, ostreambuf_iterator<char> >::
66 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
67 long) const;
68
69 template
70 ostreambuf_iterator<char>
71 num_put<char, ostreambuf_iterator<char> >::
72 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
73 unsigned long) const;
74
75 #ifdef _GLIBCPP_USE_LONG_LONG
76 template
77 ostreambuf_iterator<char>
78 num_put<char, ostreambuf_iterator<char> >::
79 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
80 long long) const;
81
82 template
83 ostreambuf_iterator<char>
84 num_put<char, ostreambuf_iterator<char> >::
85 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
86 unsigned long long) const;
87 #endif
88
89 template
90 ostreambuf_iterator<char>
91 num_put<char, ostreambuf_iterator<char> >::
92 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
93 double) const;
94
95 template
96 ostreambuf_iterator<char>
97 num_put<char, ostreambuf_iterator<char> >::
98 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
99 long double) const;
100
101 #ifdef _GLIBCPP_USE_WCHAR_T
102 template class numpunct<wchar_t>;
103 template class numpunct_byname<wchar_t>;
104 template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
105 template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
106
107 template
108 ostreambuf_iterator<wchar_t>
109 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
110 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
111 long) const;
112
113 template
114 ostreambuf_iterator<wchar_t>
115 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
116 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
117 unsigned long) const;
118
119 #ifdef _GLIBCPP_USE_LONG_LONG
120 template
121 ostreambuf_iterator<wchar_t>
122 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
123 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
124 long long) const;
125
126 template
127 ostreambuf_iterator<wchar_t>
128 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
129 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
130 unsigned long long) const;
131 #endif
132
133 template
134 ostreambuf_iterator<wchar_t>
135 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
136 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
137 double) const;
138
139 template
140 ostreambuf_iterator<wchar_t>
141 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
142 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
143 long double) const;
144 #endif
145
146 // time_get and time_put
147 template class __timepunct<char>;
148 template class time_put<char, ostreambuf_iterator<char> >;
149 template class time_put_byname<char, ostreambuf_iterator<char> >;
150 template class time_get<char, istreambuf_iterator<char> >;
151 template class time_get_byname<char, istreambuf_iterator<char> >;
152
153 #ifdef _GLIBCPP_USE_WCHAR_T
154 template class __timepunct<wchar_t>;
155 template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
156 template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
157 template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
158 template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
159 #endif
160
161 // messages
162 template class messages<char>;
163 template class messages_byname<char>;
164 #ifdef _GLIBCPP_USE_WCHAR_T
165 template class messages<wchar_t>;
166 template class messages_byname<wchar_t>;
167 #endif
168
169 // ctype
170 inline template class __ctype_abstract_base<char>;
171 template class ctype_byname<char>;
172 #ifdef _GLIBCPP_USE_WCHAR_T
173 inline template class __ctype_abstract_base<wchar_t>;
174 template class ctype_byname<wchar_t>;
175 #endif
176
177 // codecvt
178 inline template class __codecvt_abstract_base<char, char, mbstate_t>;
179 template class codecvt_byname<char, char, mbstate_t>;
180 #ifdef _GLIBCPP_USE_WCHAR_T
181 inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
182 template class codecvt_byname<wchar_t, char, mbstate_t>;
183 #endif
184
185 // collate
186 template class collate<char>;
187 template class collate_byname<char>;
188 #ifdef _GLIBCPP_USE_WCHAR_T
189 template class collate<wchar_t>;
190 template class collate_byname<wchar_t>;
191 #endif
192
193 // use_facet
194 // NB: use_facet<ctype> is specialized
195 template
196 const codecvt<char, char, mbstate_t>&
197 use_facet<codecvt<char, char, mbstate_t> >(const locale&);
198
199 template
200 const collate<char>&
201 use_facet<collate<char> >(const locale&);
202
203 template
204 const numpunct<char>&
205 use_facet<numpunct<char> >(const locale&);
206
207 template
208 const num_put<char>&
209 use_facet<num_put<char> >(const locale&);
210
211 template
212 const num_get<char>&
213 use_facet<num_get<char> >(const locale&);
214
215 template
216 const moneypunct<char, true>&
217 use_facet<moneypunct<char, true> >(const locale&);
218
219 template
220 const moneypunct<char, false>&
221 use_facet<moneypunct<char, false> >(const locale&);
222
223 template
224 const money_put<char>&
225 use_facet<money_put<char> >(const locale&);
226
227 template
228 const money_get<char>&
229 use_facet<money_get<char> >(const locale&);
230
231 template
232 const __timepunct<char>&
233 use_facet<__timepunct<char> >(const locale&);
234
235 template
236 const time_put<char>&
237 use_facet<time_put<char> >(const locale&);
238
239 template
240 const time_get<char>&
241 use_facet<time_get<char> >(const locale&);
242
243 template
244 const messages<char>&
245 use_facet<messages<char> >(const locale&);
246
247 #ifdef _GLIBCPP_USE_WCHAR_T
248 template
249 const codecvt<wchar_t, char, mbstate_t>&
250 use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
251
252 template
253 const collate<wchar_t>&
254 use_facet<collate<wchar_t> >(const locale&);
255
256 template
257 const numpunct<wchar_t>&
258 use_facet<numpunct<wchar_t> >(const locale&);
259
260 template
261 const num_put<wchar_t>&
262 use_facet<num_put<wchar_t> >(const locale&);
263
264 template
265 const num_get<wchar_t>&
266 use_facet<num_get<wchar_t> >(const locale&);
267
268 template
269 const moneypunct<wchar_t, true>&
270 use_facet<moneypunct<wchar_t, true> >(const locale&);
271
272 template
273 const moneypunct<wchar_t, false>&
274 use_facet<moneypunct<wchar_t, false> >(const locale&);
275
276 template
277 const money_put<wchar_t>&
278 use_facet<money_put<wchar_t> >(const locale&);
279
280 template
281 const money_get<wchar_t>&
282 use_facet<money_get<wchar_t> >(const locale&);
283
284 template
285 const __timepunct<wchar_t>&
286 use_facet<__timepunct<wchar_t> >(const locale&);
287
288 template
289 const time_put<wchar_t>&
290 use_facet<time_put<wchar_t> >(const locale&);
291
292 template
293 const time_get<wchar_t>&
294 use_facet<time_get<wchar_t> >(const locale&);
295
296 template
297 const messages<wchar_t>&
298 use_facet<messages<wchar_t> >(const locale&);
299 #endif
300
301 // has_facet
302 template
303 bool
304 has_facet<ctype<char> >(const locale&);
305
306 template
307 bool
308 has_facet<codecvt<char, char, mbstate_t> >(const locale&);
309
310 template
311 bool
312 has_facet<collate<char> >(const locale&);
313
314 template
315 bool
316 has_facet<numpunct<char> >(const locale&);
317
318 template
319 bool
320 has_facet<num_put<char> >(const locale&);
321
322 template
323 bool
324 has_facet<num_get<char> >(const locale&);
325
326 template
327 bool
328 has_facet<moneypunct<char> >(const locale&);
329
330 template
331 bool
332 has_facet<money_put<char> >(const locale&);
333
334 template
335 bool
336 has_facet<money_get<char> >(const locale&);
337
338 template
339 bool
340 has_facet<__timepunct<char> >(const locale&);
341
342 template
343 bool
344 has_facet<time_put<char> >(const locale&);
345
346 template
347 bool
348 has_facet<time_get<char> >(const locale&);
349
350 template
351 bool
352 has_facet<messages<char> >(const locale&);
353
354 #ifdef _GLIBCPP_USE_WCHAR_T
355 template
356 bool
357 has_facet<ctype<wchar_t> >(const locale&);
358
359 template
360 bool
361 has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
362
363 template
364 bool
365 has_facet<collate<wchar_t> >(const locale&);
366
367 template
368 bool
369 has_facet<numpunct<wchar_t> >(const locale&);
370
371 template
372 bool
373 has_facet<num_put<wchar_t> >(const locale&);
374
375 template
376 bool
377 has_facet<num_get<wchar_t> >(const locale&);
378
379 template
380 bool
381 has_facet<moneypunct<wchar_t> >(const locale&);
382
383 template
384 bool
385 has_facet<money_put<wchar_t> >(const locale&);
386
387 template
388 bool
389 has_facet<money_get<wchar_t> >(const locale&);
390
391 template
392 bool
393 has_facet<__timepunct<wchar_t> >(const locale&);
394
395 template
396 bool
397 has_facet<time_put<wchar_t> >(const locale&);
398
399 template
400 bool
401 has_facet<time_get<wchar_t> >(const locale&);
402
403 template
404 bool
405 has_facet<messages<wchar_t> >(const locale&);
406 #endif
407
408 // locale
409 template
410 char*
411 __add_grouping<char>(char*, char, char const*, char const*,
412 char const*, char const*);
413
414 template
415 bool
416 __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
417
418 template class __pad<char, char_traits<char> >;
419
420 #ifdef _GLIBCPP_USE_WCHAR_T
421 template
422 wchar_t*
423 __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
424 wchar_t const*, wchar_t const*);
425 template
426 bool
427 __verify_grouping<wchar_t>(const basic_string<wchar_t>&,
428 basic_string<wchar_t>&);
429
430 template class __pad<wchar_t, char_traits<wchar_t> >;
431 #endif
432
433 template
434 int
435 __convert_from_v(char*, const int, const char*, double,
436 const __c_locale&, int);
437
438 template
439 int
440 __convert_from_v(char*, const int, const char*, long double,
441 const __c_locale&, int);
442
443 template
444 int
445 __convert_from_v(char*, const int, const char*, long,
446 const __c_locale&, int);
447
448 template
449 int
450 __convert_from_v(char*, const int, const char*, unsigned long,
451 const __c_locale&, int);
452
453 #ifdef _GLIBCPP_USE_LONG_LONG
454 template
455 int
456 __convert_from_v(char*, const int, const char*, long long,
457 const __c_locale&, int);
458
459 template
460 int
461 __convert_from_v(char*, const int, const char*, unsigned long long,
462 const __c_locale&, int);
463 #endif
464
465 template
466 int
467 __int_to_char(char*, const int, unsigned long, const char*,
468 ios_base::fmtflags, bool);
469
470 #ifdef _GLIBCPP_USE_WCHAR_T
471 template
472 int
473 __int_to_char(wchar_t*, const int, unsigned long, const wchar_t*,
474 ios_base::fmtflags, bool);
475 #endif
476
477 #ifdef _GLIBCPP_USE_LONG_LONG
478 template
479 int
480 __int_to_char(char*, const int, unsigned long long, const char*,
481 ios_base::fmtflags, bool);
482
483 #ifdef _GLIBCPP_USE_WCHAR_T
484 template
485 int
486 __int_to_char(wchar_t*, const int, unsigned long long, const wchar_t*,
487 ios_base::fmtflags, bool);
488 #endif
489 #endif
490 } // namespace std
This page took 0.063442 seconds and 6 git commands to generate.