1 // Forwarding declarations -*- C++ -*-
3 // Copyright (C) 1997-1999 Free Software Foundation, Inc.
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)
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.
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,
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.
31 // ISO C++ 14882: 27.2 Forward declarations
37 #include <bits/c++config.h>
38 #include <bits/std_cwchar.h> //For mbstate_t
42 // Generic declarations.
43 template<typename _CharT> struct char_traits;
44 template<typename _Alloc> class allocator;
46 // Forward declarations
47 template<> class char_traits<char>;
48 #ifdef _GLIBCPP_USE_WCHAR_T
49 template<> class char_traits<wchar_t>;
52 template<typename _CharT, typename _Traits = char_traits<_CharT> >
55 template<typename _CharT, typename _Traits = char_traits<_CharT> >
56 class basic_streambuf;
58 template<typename _CharT, typename _Traits = char_traits<_CharT> >
61 template<typename _CharT, typename _Traits = char_traits<_CharT> >
64 template<typename _CharT, typename _Traits = char_traits<_CharT> >
67 template<typename _CharT, typename _Traits = char_traits<_CharT>,
68 typename _Alloc = allocator<_CharT> >
69 class basic_stringbuf;
71 template<typename _CharT, typename _Traits = char_traits<_CharT>,
72 typename _Alloc = allocator<_CharT> >
73 class basic_istringstream;
75 template<typename _CharT, typename _Traits = char_traits<_CharT>,
76 typename _Alloc = allocator<_CharT> >
77 class basic_ostringstream;
79 template<typename _CharT, typename _Traits = char_traits<_CharT>,
80 typename _Alloc = allocator<_CharT> >
81 class basic_stringstream;
83 template<typename _CharT, typename _Traits = char_traits<_CharT> >
86 template<typename _CharT, typename _Traits = char_traits<_CharT> >
89 template<typename _CharT, typename _Traits = char_traits<_CharT> >
92 template<typename _CharT, typename _Traits = char_traits<_CharT> >
95 template<typename _CharT, typename _Traits = char_traits<_CharT> >
96 class istreambuf_iterator;
98 template<typename _CharT, typename _Traits = char_traits<_CharT> >
99 class ostreambuf_iterator;
101 #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
106 template<class _State> struct fpos;
107 #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
108 // Can't have self-recursive types for streampos.
109 // 21.1.3.1 char_traits sets size_type to streampos
111 // And here, where streampos is typedefed to fpos<traits::state_type>
112 typedef fpos<mbstate_t> streampos;
113 # ifdef _GLIBCPP_USE_WCHAR_T
114 typedef fpos<mbstate_t> wstreampos;
118 typedef basic_ios<char> ios;
119 typedef basic_streambuf<char> streambuf;
120 typedef basic_istream<char> istream;
121 typedef basic_ostream<char> ostream;
122 typedef basic_iostream<char> iostream;
123 typedef basic_stringbuf<char> stringbuf;
124 typedef basic_istringstream<char> istringstream;
125 typedef basic_ostringstream<char> ostringstream;
126 typedef basic_stringstream<char> stringstream;
127 typedef basic_filebuf<char> filebuf;
128 typedef basic_ifstream<char> ifstream;
129 typedef basic_ofstream<char> ofstream;
130 typedef basic_fstream<char> fstream;
132 #ifdef _GLIBCPP_USE_WCHAR_T
133 typedef basic_ios<wchar_t> wios;
134 typedef basic_streambuf<wchar_t> wstreambuf;
135 typedef basic_istream<wchar_t> wistream;
136 typedef basic_ostream<wchar_t> wostream;
137 typedef basic_iostream<wchar_t> wiostream;
138 typedef basic_stringbuf<wchar_t> wstringbuf;
139 typedef basic_istringstream<wchar_t> wistringstream;
140 typedef basic_ostringstream<wchar_t> wostringstream;
141 typedef basic_stringstream<wchar_t> wstringstream;
142 typedef basic_filebuf<wchar_t> wfilebuf;
143 typedef basic_ifstream<wchar_t> wifstream;
144 typedef basic_ofstream<wchar_t> wofstream;
145 typedef basic_fstream<wchar_t> wfstream;
150 #endif // _CPP_IOSFWD