OSDN Git Service

2001-02-06 Jeffrey Oldham <oldham@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / src / misc-inst.cc
1 // Explicit instantiation file.
2
3 // Copyright (C) 1997-1999, 2000, 2001 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:
32 //
33
34 #include <bits/std_string.h>
35 #include <bits/std_algorithm.h>
36 #include <bits/std_locale.h>
37 #include <bits/std_vector.h>
38 #include <bits/std_iterator.h>
39 #include <bits/std_streambuf.h>
40 #include <bits/std_sstream.h>
41 #include <bits/std_fstream.h>
42 #include <bits/std_ios.h>
43 #include <bits/basic_ios.tcc>
44 #include <bits/std_istream.h>
45 #include <bits/std_ostream.h>
46 #include <bits/std_string.h>
47
48 // NB: unnecessary if the .h headers include these
49 #ifndef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
50 #include <bits/sstream.tcc>
51 #include <bits/fstream.tcc>
52 #include <bits/streambuf.tcc>
53 #include <bits/istream.tcc>
54 #include <bits/ostream.tcc>
55 #endif
56
57 namespace std {
58
59   //
60   // streambuf
61   // 
62   template class basic_streambuf<char>;
63 #ifdef _GLIBCPP_USE_WCHAR_T
64   template class basic_streambuf<wchar_t>;
65 #endif
66
67
68   //
69   // stringstream
70   //
71   template class basic_stringbuf<char>;
72 #ifdef _GLIBCPP_USE_WCHAR_T
73   template class basic_stringbuf<wchar_t>;
74 #endif
75
76
77   //
78   // fstream
79   //
80   template class basic_filebuf<char, char_traits<char> >;
81 #ifdef _GLIBCPP_USE_WCHAR_T
82   template class basic_filebuf<wchar_t, char_traits<wchar_t> >;
83 #endif
84
85
86   //
87   // basic_ios
88   //
89   template class basic_ios<char>;
90 #ifdef _GLIBCPP_USE_WCHAR_T
91   template class basic_ios<wchar_t>;
92 #endif
93
94
95   //
96   // istream
97   //
98   template class basic_istream<char>;
99   template istream& ws(istream&);
100   template istream& operator>>(istream&, char&);
101   template istream& operator>>(istream&, unsigned char&);
102   template istream& operator>>(istream&, signed char&);
103   template istream& operator>>(istream&, char*);
104   template istream& operator>>(istream&, unsigned char*);
105   template istream& operator>>(istream&, signed char*);
106 #ifdef _GLIBCPP_USE_WCHAR_T
107   template class basic_istream<wchar_t>;
108   template wistream& ws(wistream&);
109   template wistream& operator>>(wistream&, wchar_t&);
110   template wistream& operator>>(wistream&, wchar_t*);
111 #endif
112
113
114   //
115   // ostream
116   //
117   template class basic_ostream<char>;
118   template ostream& endl(ostream&);
119   template ostream& ends(ostream&);
120   template ostream& flush(ostream&);
121   template ostream& operator<<(ostream&, char);
122   template ostream& operator<<(ostream&, unsigned char);
123   template ostream& operator<<(ostream&, signed char);
124   template ostream& operator<<(ostream&, const char*);
125   template ostream& operator<<(ostream&, const unsigned char*);
126   template ostream& operator<<(ostream&, const signed char*);
127 #ifdef _GLIBCPP_USE_WCHAR_T
128   template class basic_ostream<wchar_t>;
129   template wostream& endl(wostream&);
130   template wostream& ends(wostream&);
131   template wostream& flush(wostream&);
132   template wostream& operator<<(wostream&, wchar_t);
133   template wostream& operator<<(wostream&, char);
134   template wostream& operator<<(wostream&, const wchar_t*);
135   template wostream& operator<<(wostream&, const char*);
136 #endif
137   
138
139   //
140   // iostream
141   //
142   template class basic_iostream<char>;
143 #ifdef _GLIBCPP_USE_WCHAR_T
144   template class basic_iostream<wchar_t>; 
145 #endif
146
147
148   //
149   // ifstream
150   //
151   template class basic_ifstream<char>;
152 #ifdef _GLIBCPP_USE_WCHAR_T
153   template class basic_ifstream<wchar_t>;
154 #endif
155
156
157   //
158   // ofstream
159   //
160   template class basic_ofstream<char>;
161 #ifdef _GLIBCPP_USE_WCHAR_T
162   template class basic_ofstream<wchar_t>;
163 #endif
164
165
166   //
167   // istringstream
168   //
169   template class basic_istringstream<char>;
170 #ifdef _GLIBCPP_USE_WCHAR_T
171   template class basic_istringstream<wchar_t>; 
172 #endif
173
174
175   //
176   // ostringstream
177   //
178   template class basic_ostringstream<char>;
179 #ifdef _GLIBCPP_USE_WCHAR_T
180   template class basic_ostringstream<wchar_t>; 
181 #endif
182
183
184   //
185   // string related to iostreams
186   //
187   template 
188     basic_istream<char>& 
189     operator>>(basic_istream<char>&, string&);
190   template 
191     basic_ostream<char>& 
192     operator<<(basic_ostream<char>&, const string&);
193   template 
194     basic_istream<char>& 
195     getline(basic_istream<char>&, string&, char);
196   template 
197     basic_istream<char>& 
198     getline(basic_istream<char>&, string&);
199 #ifdef _GLIBCPP_USE_WCHAR_T
200   template 
201     basic_istream<wchar_t>& 
202     operator>>(basic_istream<wchar_t>&, wstring&);
203   template 
204     basic_ostream<wchar_t>& 
205     operator<<(basic_ostream<wchar_t>&, const wstring&);
206   template 
207     basic_istream<wchar_t>& 
208     getline(basic_istream<wchar_t>&, wstring&, wchar_t);
209   template 
210     basic_istream<wchar_t>& 
211     getline(basic_istream<wchar_t>&, wstring&);
212 #endif
213
214   //
215   // algorithm
216   //
217   typedef  _Char_traits_match<char, char_traits<char> > char_match;
218
219   template 
220     const char*  
221     find_if<const char *, char_match>
222     (const char *, const char *, char_match, random_access_iterator_tag);
223
224 #ifdef _GLIBCPP_USE_WCHAR_T
225   typedef  _Char_traits_match<wchar_t, char_traits<wchar_t> > wchar_match;
226
227   template const wchar_t*  
228     find_if<const wchar_t*, wchar_match>
229     (const wchar_t*, const wchar_t*, wchar_match, random_access_iterator_tag);
230 #endif
231   
232   template 
233     string* 
234     __uninitialized_fill_n_aux<string*, size_t, string>
235     (string*, size_t, string const &, _Bool<false>);
236
237   template 
238     string* 
239     __uninitialized_copy_aux<vector<string>::const_iterator, string *>
240     (vector<string>::const_iterator, vector<string>::const_iterator, 
241      string*, _Bool<false>);
242
243   template
244     void 
245     __sink_unused_warning<char>(char);
246 #ifdef _GLIBCPP_USE_WCHAR_T
247   template
248     void 
249     __sink_unused_warning<wchar_t>(wchar_t);
250 #endif
251
252   template
253     void
254     __sink_unused_warning<ostreambuf_iterator<char> > 
255     (ostreambuf_iterator<char>);
256 #ifdef _GLIBCPP_USE_WCHAR_T
257   template
258     void
259     __sink_unused_warning<ostreambuf_iterator<wchar_t> > 
260     (ostreambuf_iterator<wchar_t>);
261 #endif
262
263   template
264     void 
265     _S_pad_char (basic_ios<char>&, char*, const char*,
266                  const streamsize, const streamsize);
267 #ifdef _GLIBCPP_USE_WCHAR_T
268   template
269     void 
270     _S_pad_char (basic_ios<wchar_t>&, wchar_t*, const wchar_t*,
271                  const streamsize, const streamsize);
272 #endif
273
274   template
275     ostreambuf_iterator<char>
276     _S_pad_numeric (ostreambuf_iterator<char>, _Ios_Fmtflags, char, int,
277                     const char*, const char*, const char*);
278 #ifdef _GLIBCPP_USE_WCHAR_T
279   template
280     ostreambuf_iterator<wchar_t>
281     _S_pad_numeric (ostreambuf_iterator<wchar_t>, _Ios_Fmtflags, wchar_t, int,
282                     const wchar_t*, const wchar_t*, const wchar_t*);
283 #endif
284
285   template
286     ostreambuf_iterator<char>
287     _S_output_float (ostreambuf_iterator<char>, ios_base&, char, 
288                      const char*, size_t);
289 #ifdef _GLIBCPP_USE_WCHAR_T
290   template
291     ostreambuf_iterator<wchar_t>
292     _S_output_float (ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, 
293                      const wchar_t*, size_t);
294 #endif
295
296   template
297     streamsize
298     _S_copy_streambufs(basic_ios<char>&, 
299                        basic_streambuf<char>*,
300                        basic_streambuf<char>*); 
301 #ifdef _GLIBCPP_USE_WCHAR_T
302   template
303     int
304     _S_copy_streambufs(basic_ios<wchar_t>&, 
305                        basic_streambuf<wchar_t>*,
306                        basic_streambuf<wchar_t>*); 
307 #endif
308 } //std