2005-12-18 Benjamin Kosnik <bkoz@redhat.com>
[official-gcc.git] / libstdc++-v3 / src / locale-inst.cc
blobfd2a8d4b8280a687a9c483ca812c496ab7331a82
1 // Locale support -*- C++ -*-
3 // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
4 // Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction. Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License. This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
32 // ISO C++ 14882: 22.1 Locales
35 #include <locale>
37 // Instantiation configuration.
38 #ifndef C
39 # define C char
40 #endif
42 _GLIBCXX_BEGIN_NAMESPACE(std)
44 // moneypunct, money_get, and money_put
45 template class moneypunct<C, false>;
46 template class moneypunct<C, true>;
47 template struct __moneypunct_cache<C, false>;
48 template struct __moneypunct_cache<C, true>;
49 template class moneypunct_byname<C, false>;
50 template class moneypunct_byname<C, true>;
51 template class money_get<C, istreambuf_iterator<C> >;
52 template class money_put<C, ostreambuf_iterator<C> >;
53 template
54 istreambuf_iterator<C>
55 money_get<C, istreambuf_iterator<C> >::
56 _M_extract<true>(istreambuf_iterator<C>, istreambuf_iterator<C>,
57 ios_base&, ios_base::iostate&, string&) const;
59 template
60 istreambuf_iterator<C>
61 money_get<C, istreambuf_iterator<C> >::
62 _M_extract<false>(istreambuf_iterator<C>, istreambuf_iterator<C>,
63 ios_base&, ios_base::iostate&, string&) const;
65 template
66 ostreambuf_iterator<C>
67 money_put<C, ostreambuf_iterator<C> >::
68 _M_insert<true>(ostreambuf_iterator<C>, ios_base&, C,
69 const string_type&) const;
71 template
72 ostreambuf_iterator<C>
73 money_put<C, ostreambuf_iterator<C> >::
74 _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
75 const string_type&) const;
77 // numpunct, numpunct_byname, num_get, and num_put
78 template class numpunct<C>;
79 template struct __numpunct_cache<C>;
80 template class numpunct_byname<C>;
81 template class num_get<C, istreambuf_iterator<C> >;
82 template class num_put<C, ostreambuf_iterator<C> >;
83 template
84 istreambuf_iterator<C>
85 num_get<C, istreambuf_iterator<C> >::
86 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
87 ios_base&, ios_base::iostate&,
88 long&) const;
90 template
91 istreambuf_iterator<C>
92 num_get<C, istreambuf_iterator<C> >::
93 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
94 ios_base&, ios_base::iostate&,
95 unsigned short&) const;
97 template
98 istreambuf_iterator<C>
99 num_get<C, istreambuf_iterator<C> >::
100 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
101 ios_base&, ios_base::iostate&,
102 unsigned int&) const;
104 template
105 istreambuf_iterator<C>
106 num_get<C, istreambuf_iterator<C> >::
107 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
108 ios_base&, ios_base::iostate&,
109 unsigned long&) const;
111 #ifdef _GLIBCXX_USE_LONG_LONG
112 template
113 istreambuf_iterator<C>
114 num_get<C, istreambuf_iterator<C> >::
115 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
116 ios_base&, ios_base::iostate&,
117 long long&) const;
119 template
120 istreambuf_iterator<C>
121 num_get<C, istreambuf_iterator<C> >::
122 _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
123 ios_base&, ios_base::iostate&,
124 unsigned long long&) const;
125 #endif
127 template
128 ostreambuf_iterator<C>
129 num_put<C, ostreambuf_iterator<C> >::
130 _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
131 long) const;
133 template
134 ostreambuf_iterator<C>
135 num_put<C, ostreambuf_iterator<C> >::
136 _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
137 unsigned long) const;
139 #ifdef _GLIBCXX_USE_LONG_LONG
140 template
141 ostreambuf_iterator<C>
142 num_put<C, ostreambuf_iterator<C> >::
143 _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
144 long long) const;
146 template
147 ostreambuf_iterator<C>
148 num_put<C, ostreambuf_iterator<C> >::
149 _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
150 unsigned long long) const;
151 #endif
153 template
154 ostreambuf_iterator<C>
155 num_put<C, ostreambuf_iterator<C> >::
156 _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
157 double) const;
159 template
160 ostreambuf_iterator<C>
161 num_put<C, ostreambuf_iterator<C> >::
162 _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
163 long double) const;
165 // time_get and time_put
166 template class __timepunct<C>;
167 template struct __timepunct_cache<C>;
168 template class time_put<C, ostreambuf_iterator<C> >;
169 template class time_put_byname<C, ostreambuf_iterator<C> >;
170 template class time_get<C, istreambuf_iterator<C> >;
171 template class time_get_byname<C, istreambuf_iterator<C> >;
173 // messages
174 template class messages<C>;
175 template class messages_byname<C>;
177 // ctype
178 inline template class __ctype_abstract_base<C>;
179 template class ctype_byname<C>;
181 // codecvt
182 inline template class __codecvt_abstract_base<C, char, mbstate_t>;
183 template class codecvt_byname<C, char, mbstate_t>;
185 // collate
186 template class collate<C>;
187 template class collate_byname<C>;
189 // use_facet
190 // NB: use_facet<ctype> is specialized
191 template
192 const codecvt<C, char, mbstate_t>&
193 use_facet<codecvt<C, char, mbstate_t> >(const locale&);
195 template
196 const collate<C>&
197 use_facet<collate<C> >(const locale&);
199 template
200 const numpunct<C>&
201 use_facet<numpunct<C> >(const locale&);
203 template
204 const num_put<C>&
205 use_facet<num_put<C> >(const locale&);
207 template
208 const num_get<C>&
209 use_facet<num_get<C> >(const locale&);
211 template
212 const moneypunct<C, true>&
213 use_facet<moneypunct<C, true> >(const locale&);
215 template
216 const moneypunct<C, false>&
217 use_facet<moneypunct<C, false> >(const locale&);
219 template
220 const money_put<C>&
221 use_facet<money_put<C> >(const locale&);
223 template
224 const money_get<C>&
225 use_facet<money_get<C> >(const locale&);
227 template
228 const __timepunct<C>&
229 use_facet<__timepunct<C> >(const locale&);
231 template
232 const time_put<C>&
233 use_facet<time_put<C> >(const locale&);
235 template
236 const time_get<C>&
237 use_facet<time_get<C> >(const locale&);
239 template
240 const messages<C>&
241 use_facet<messages<C> >(const locale&);
243 // has_facet
244 template
245 bool
246 has_facet<ctype<C> >(const locale&);
248 template
249 bool
250 has_facet<codecvt<C, char, mbstate_t> >(const locale&);
252 template
253 bool
254 has_facet<collate<C> >(const locale&);
256 template
257 bool
258 has_facet<numpunct<C> >(const locale&);
260 template
261 bool
262 has_facet<num_put<C> >(const locale&);
264 template
265 bool
266 has_facet<num_get<C> >(const locale&);
268 template
269 bool
270 has_facet<moneypunct<C> >(const locale&);
272 template
273 bool
274 has_facet<money_put<C> >(const locale&);
276 template
277 bool
278 has_facet<money_get<C> >(const locale&);
280 template
281 bool
282 has_facet<__timepunct<C> >(const locale&);
284 template
285 bool
286 has_facet<time_put<C> >(const locale&);
288 template
289 bool
290 has_facet<time_get<C> >(const locale&);
292 template
293 bool
294 has_facet<messages<C> >(const locale&);
297 // locale functions.
298 template
300 __add_grouping<C>(C*, C, char const*, size_t,
301 C const*, C const*);
303 template class __pad<C, char_traits<C> >;
305 template
307 __int_to_char(C*, unsigned long, const C*,
308 ios_base::fmtflags, bool);
310 #ifdef _GLIBCXX_USE_LONG_LONG
311 template
313 __int_to_char(C*, unsigned long long, const C*,
314 ios_base::fmtflags, bool);
315 #endif
317 _GLIBCXX_END_NAMESPACE