1 // Explicit instantiation file. 2 3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 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. 11 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. 16 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 // USA. 21 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. 30 31 // 32 // ISO C++ 14882: 33 // 34 35 #include <string> 36 #include <algorithm> 37 #include <locale> 38 #include <vector> 39 #include <iterator> 40 #include <streambuf> 41 #include <sstream> 42 #include <fstream> 43 #include <ios> 44 #include <istream> 45 #include <ostream> 46 #include <iomanip> 47 #include <ext/stdio_filebuf.h> 48 49 // NB: Unnecessary if the .h headers already include these. 50 #ifndef _GLIBCPP_FULLY_COMPLIANT_HEADERS 51 #include <bits/sstream.tcc> 52 #include <bits/fstream.tcc> 53 #include <bits/streambuf.tcc> 54 #include <bits/istream.tcc> 55 #include <bits/ostream.tcc> 56 #endif 57 58 namespace std 59 { 60 // streambuf 61 template class basic_streambuf<char>; 62 #ifdef _GLIBCPP_USE_WCHAR_T 63 template class basic_streambuf<wchar_t>; 64 #endif 65 66 // stringbuf 67 template class basic_stringbuf<char>; 68 #ifdef _GLIBCPP_USE_WCHAR_T 69 template class basic_stringbuf<wchar_t>; 70 #endif 71 72 // filebuf 73 template class basic_filebuf<char, char_traits<char> >; 74 #ifdef _GLIBCPP_USE_WCHAR_T 75 template class basic_filebuf<wchar_t, char_traits<wchar_t> >; 76 #endif 77 78 // basic_ios 79 template class basic_ios<char>; 80 #ifdef _GLIBCPP_USE_WCHAR_T 81 template class basic_ios<wchar_t>; 82 #endif 83 84 // iomanip 85 template class _Setfill<char>; 86 template _Setfill<char> setfill(char); 87 #ifdef _GLIBCPP_USE_WCHAR_T 88 template class _Setfill<wchar_t>; 89 template _Setfill<wchar_t> setfill(wchar_t); 90 #endif 91 92 // istream 93 template class basic_istream<char>; 94 template istream& ws(istream&); 95 template istream& operator>>(istream&, char&); 96 template istream& operator>>(istream&, unsigned char&); 97 template istream& operator>>(istream&, signed char&); 98 template istream& operator>>(istream&, char*); 99 template istream& operator>>(istream&, unsigned char*); 100 template istream& operator>>(istream&, signed char*); 101 102 template istream& operator>>(istream&, _Setfill<char>); 103 template istream& operator>>(istream&, _Setiosflags); 104 template istream& operator>>(istream&, _Resetiosflags); 105 template istream& operator>>(istream&, _Setbase); 106 template istream& operator>>(istream&, _Setprecision); 107 template istream& operator>>(istream&, _Setw); 108 109 #ifdef _GLIBCPP_USE_WCHAR_T 110 template class basic_istream<wchar_t>; 111 template wistream& ws(wistream&); 112 template wistream& operator>>(wistream&, wchar_t&); 113 template wistream& operator>>(wistream&, wchar_t*); 114 115 template wistream& operator>>(wistream&, _Setfill<wchar_t>); 116 template wistream& operator>>(wistream&, _Setiosflags); 117 template wistream& operator>>(wistream&, _Resetiosflags); 118 template wistream& operator>>(wistream&, _Setbase); 119 template wistream& operator>>(wistream&, _Setprecision); 120 template wistream& operator>>(wistream&, _Setw); 121 #endif 122 123 // ostream 124 template class basic_ostream<char>; 125 template ostream& endl(ostream&); 126 template ostream& ends(ostream&); 127 template ostream& flush(ostream&); 128 template ostream& operator<<(ostream&, char); 129 template ostream& operator<<(ostream&, unsigned char); 130 template ostream& operator<<(ostream&, signed char); 131 template ostream& operator<<(ostream&, const char*); 132 template ostream& operator<<(ostream&, const unsigned char*); 133 template ostream& operator<<(ostream&, const signed char*); 134 135 template ostream& operator<<(ostream&, _Setfill<char>); 136 template ostream& operator<<(ostream&, _Setiosflags); 137 template ostream& operator<<(ostream&, _Resetiosflags); 138 template ostream& operator<<(ostream&, _Setbase); 139 template ostream& operator<<(ostream&, _Setprecision); 140 template ostream& operator<<(ostream&, _Setw); 141 142 #ifdef _GLIBCPP_USE_WCHAR_T 143 template class basic_ostream<wchar_t>; 144 template wostream& endl(wostream&); 145 template wostream& ends(wostream&); 146 template wostream& flush(wostream&); 147 template wostream& operator<<(wostream&, wchar_t); 148 template wostream& operator<<(wostream&, char); 149 template wostream& operator<<(wostream&, const wchar_t*); 150 template wostream& operator<<(wostream&, const char*); 151 152 template wostream& operator<<(wostream&, _Setfill<wchar_t>); 153 template wostream& operator<<(wostream&, _Setiosflags); 154 template wostream& operator<<(wostream&, _Resetiosflags); 155 template wostream& operator<<(wostream&, _Setbase); 156 template wostream& operator<<(wostream&, _Setprecision); 157 template wostream& operator<<(wostream&, _Setw); 158 #endif 159 160 161 // iostream 162 template class basic_iostream<char>; 163 #ifdef _GLIBCPP_USE_WCHAR_T 164 template class basic_iostream<wchar_t>; 165 #endif 166 167 // ifstream 168 template class basic_ifstream<char>; 169 #ifdef _GLIBCPP_USE_WCHAR_T 170 template class basic_ifstream<wchar_t>; 171 #endif 172 173 // ofstream 174 template class basic_ofstream<char>; 175 #ifdef _GLIBCPP_USE_WCHAR_T 176 template class basic_ofstream<wchar_t>; 177 #endif 178 179 // fstream 180 template class basic_fstream<char>; 181 #ifdef _GLIBCPP_USE_WCHAR_T 182 template class basic_fstream<wchar_t>; 183 #endif 184 185 // istringstream 186 template class basic_istringstream<char>; 187 #ifdef _GLIBCPP_USE_WCHAR_T 188 template class basic_istringstream<wchar_t>; 189 #endif 190 191 // ostringstream 192 template class basic_ostringstream<char>; 193 #ifdef _GLIBCPP_USE_WCHAR_T 194 template class basic_ostringstream<wchar_t>; 195 #endif 196 197 // stringstream 198 template class basic_stringstream<char>; 199 #ifdef _GLIBCPP_USE_WCHAR_T 200 template class basic_stringstream<wchar_t>; 201 #endif 202 203 // string related to iostreams 204 template 205 basic_istream<char>& 206 operator>>(basic_istream<char>&, string&); 207 template 208 basic_ostream<char>& 209 operator<<(basic_ostream<char>&, const string&); 210 template 211 basic_istream<char>& 212 getline(basic_istream<char>&, string&, char); 213 template 214 basic_istream<char>& 215 getline(basic_istream<char>&, string&); 216 #ifdef _GLIBCPP_USE_WCHAR_T 217 template 218 basic_istream<wchar_t>& 219 operator>>(basic_istream<wchar_t>&, wstring&); 220 template 221 basic_ostream<wchar_t>& 222 operator<<(basic_ostream<wchar_t>&, const wstring&); 223 template 224 basic_istream<wchar_t>& 225 getline(basic_istream<wchar_t>&, wstring&, wchar_t); 226 template 227 basic_istream<wchar_t>& 228 getline(basic_istream<wchar_t>&, wstring&); 229 #endif 230 231 // algorithm 232 typedef _Char_traits_match<char, char_traits<char> > char_match; 233 234 template 235 const char* 236 find_if<const char *, char_match> 237 (const char *, const char *, char_match, random_access_iterator_tag); 238 239 #ifdef _GLIBCPP_USE_WCHAR_T 240 typedef _Char_traits_match<wchar_t, char_traits<wchar_t> > wchar_match; 241 242 template const wchar_t* 243 find_if<const wchar_t*, wchar_match> 244 (const wchar_t*, const wchar_t*, wchar_match, random_access_iterator_tag); 245 #endif 246 247 template 248 string* 249 __uninitialized_fill_n_aux<string*, size_t, string> 250 (string*, size_t, string const &, __false_type); 251 252 template 253 string* 254 __uninitialized_copy_aux<vector<string>::const_iterator, string *> 255 (vector<string>::const_iterator, vector<string>::const_iterator, 256 string*, __false_type); 257 258 template 259 streamsize 260 __copy_streambufs(basic_ios<char>&, basic_streambuf<char>*, 261 basic_streambuf<char>*); 262 #ifdef _GLIBCPP_USE_WCHAR_T 263 template 264 streamsize 265 __copy_streambufs(basic_ios<wchar_t>&, basic_streambuf<wchar_t>*, 266 basic_streambuf<wchar_t>*); 267 #endif 268 269 using __gnu_cxx::stdio_filebuf; 270 template class stdio_filebuf<char>; 271 #ifdef _GLIBCPP_USE_WCHAR_T 272 template class stdio_filebuf<wchar_t>; 273 #endif 274 } //std 275