1 #ifndef _STLP_INTERNAL_IOSFWD
2 #define _STLP_INTERNAL_IOSFWD
4 #if defined (__sgi) && !defined (__GNUC__) && !defined (_STANDARD_C_PLUS_PLUS)
5 # error This header file requires the -LANG:std option
8 // This file provides forward declarations of the most important I/O
9 // classes. Note that almost all of those classes are class templates,
10 // with default template arguments. According to the C++ standard,
11 // if a class template is declared more than once in the same scope
12 // then only one of those declarations may have default arguments.
14 // <iosfwd> contains the same declarations as other headers, and including
15 // both <iosfwd> and (say) <iostream> is permitted. This means that only
16 // one header may contain those default template arguments.
18 // In this implementation, the declarations in <iosfwd> contain default
19 // template arguments. All of the other I/O headers include <iosfwd>.
21 #ifndef _STLP_CHAR_TRAITS_H
22 # include <stl/char_traits.h>
29 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
32 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
33 class basic_streambuf;
35 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
38 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
41 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
44 template <class _CharT, _STLP_DFL_TMPL_PARAM( _Traits , char_traits<_CharT>),
45 _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
46 class basic_stringbuf;
48 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
49 _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
50 class basic_istringstream;
52 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
53 _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
54 class basic_ostringstream;
56 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
57 _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
58 class basic_stringstream;
60 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
63 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
66 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
69 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
72 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
73 class istreambuf_iterator;
75 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
76 class ostreambuf_iterator;
78 typedef basic_ios<char, char_traits<char> > ios;
80 #if !defined (_STLP_NO_WCHAR_T)
81 typedef basic_ios<wchar_t, char_traits<wchar_t> > wios;
84 // Forward declaration of class locale, and of the most important facets.
86 #if defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
87 template <class _Facet>
90 _Use_facet(const locale& __p_loc) : __loc(__p_loc) {}
91 inline const _Facet& operator *() const;
93 # define use_facet *_Use_facet
95 template <class _Facet> inline const _Facet& use_facet(const locale&);
98 template <class _CharT> class ctype;
99 template <class _CharT> class ctype_byname;
100 template <class _CharT> class collate;
101 template <class _CharT> class collate_byname;
103 _STLP_TEMPLATE_NULL class ctype<char>;
104 _STLP_TEMPLATE_NULL class ctype_byname<char>;
105 _STLP_TEMPLATE_NULL class collate<char>;
106 _STLP_TEMPLATE_NULL class collate_byname<char>;
108 #if !defined (_STLP_NO_WCHAR_T)
109 _STLP_TEMPLATE_NULL class ctype<wchar_t>;
110 _STLP_TEMPLATE_NULL class ctype_byname<wchar_t>;
111 _STLP_TEMPLATE_NULL class collate<wchar_t>;
112 _STLP_TEMPLATE_NULL class collate_byname<wchar_t>;
115 #if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 )
116 // Typedefs for ordinary (narrow-character) streams.
117 //_STLP_TEMPLATE_NULL class basic_streambuf<char, char_traits<char> >;
120 typedef basic_istream<char, char_traits<char> > istream;
121 typedef basic_ostream<char, char_traits<char> > ostream;
122 typedef basic_iostream<char, char_traits<char> > iostream;
123 typedef basic_streambuf<char,char_traits<char> > streambuf;
125 typedef basic_stringbuf<char, char_traits<char>, allocator<char> > stringbuf;
126 typedef basic_istringstream<char, char_traits<char>, allocator<char> > istringstream;
127 typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
128 typedef basic_stringstream<char, char_traits<char>, allocator<char> > stringstream;
130 typedef basic_filebuf<char, char_traits<char> > filebuf;
131 typedef basic_ifstream<char, char_traits<char> > ifstream;
132 typedef basic_ofstream<char, char_traits<char> > ofstream;
133 typedef basic_fstream<char, char_traits<char> > fstream;
135 #if !defined (_STLP_NO_WCHAR_T)
136 // Typedefs for wide-character streams.
137 typedef basic_streambuf<wchar_t, char_traits<wchar_t> > wstreambuf;
138 typedef basic_istream<wchar_t, char_traits<wchar_t> > wistream;
139 typedef basic_ostream<wchar_t, char_traits<wchar_t> > wostream;
140 typedef basic_iostream<wchar_t, char_traits<wchar_t> > wiostream;
142 typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringbuf;
143 typedef basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wistringstream;
144 typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wostringstream;
145 typedef basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringstream;
147 typedef basic_filebuf<wchar_t, char_traits<wchar_t> > wfilebuf;
148 typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream;
149 typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream;
150 typedef basic_fstream<wchar_t, char_traits<wchar_t> > wfstream;