xref: /aosp_15_r20/external/libcxx/include/iosfwd (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1*58b9f456SAndroid Build Coastguard Worker// -*- C++ -*-
2*58b9f456SAndroid Build Coastguard Worker//===--------------------------- iosfwd -----------------------------------===//
3*58b9f456SAndroid Build Coastguard Worker//
4*58b9f456SAndroid Build Coastguard Worker//                     The LLVM Compiler Infrastructure
5*58b9f456SAndroid Build Coastguard Worker//
6*58b9f456SAndroid Build Coastguard Worker// This file is dual licensed under the MIT and the University of Illinois Open
7*58b9f456SAndroid Build Coastguard Worker// Source Licenses. See LICENSE.TXT for details.
8*58b9f456SAndroid Build Coastguard Worker//
9*58b9f456SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
10*58b9f456SAndroid Build Coastguard Worker
11*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_IOSFWD
12*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_IOSFWD
13*58b9f456SAndroid Build Coastguard Worker
14*58b9f456SAndroid Build Coastguard Worker/*
15*58b9f456SAndroid Build Coastguard Worker    iosfwd synopsis
16*58b9f456SAndroid Build Coastguard Worker
17*58b9f456SAndroid Build Coastguard Workernamespace std
18*58b9f456SAndroid Build Coastguard Worker{
19*58b9f456SAndroid Build Coastguard Worker
20*58b9f456SAndroid Build Coastguard Workertemplate<class charT> struct char_traits;
21*58b9f456SAndroid Build Coastguard Workertemplate<>            struct char_traits<char>;
22*58b9f456SAndroid Build Coastguard Workertemplate<>            struct char_traits<char8_t>;  // C++20
23*58b9f456SAndroid Build Coastguard Workertemplate<>            struct char_traits<char16_t>;
24*58b9f456SAndroid Build Coastguard Workertemplate<>            struct char_traits<char32_t>;
25*58b9f456SAndroid Build Coastguard Workertemplate<>            struct char_traits<wchar_t>;
26*58b9f456SAndroid Build Coastguard Worker
27*58b9f456SAndroid Build Coastguard Workertemplate<class T>     class allocator;
28*58b9f456SAndroid Build Coastguard Worker
29*58b9f456SAndroid Build Coastguard Workerclass ios_base;
30*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_ios;
31*58b9f456SAndroid Build Coastguard Worker
32*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_streambuf;
33*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_istream;
34*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_ostream;
35*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_iostream;
36*58b9f456SAndroid Build Coastguard Worker
37*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
38*58b9f456SAndroid Build Coastguard Worker    class basic_stringbuf;
39*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
40*58b9f456SAndroid Build Coastguard Worker    class basic_istringstream;
41*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
42*58b9f456SAndroid Build Coastguard Worker    class basic_ostringstream;
43*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
44*58b9f456SAndroid Build Coastguard Worker    class basic_stringstream;
45*58b9f456SAndroid Build Coastguard Worker
46*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_filebuf;
47*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_ifstream;
48*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_ofstream;
49*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class basic_fstream;
50*58b9f456SAndroid Build Coastguard Worker
51*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
52*58b9f456SAndroid Build Coastguard Workertemplate <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
53*58b9f456SAndroid Build Coastguard Worker
54*58b9f456SAndroid Build Coastguard Workertypedef basic_ios<char>              ios;
55*58b9f456SAndroid Build Coastguard Workertypedef basic_ios<wchar_t>           wios;
56*58b9f456SAndroid Build Coastguard Worker
57*58b9f456SAndroid Build Coastguard Workertypedef basic_streambuf<char>        streambuf;
58*58b9f456SAndroid Build Coastguard Workertypedef basic_istream<char>          istream;
59*58b9f456SAndroid Build Coastguard Workertypedef basic_ostream<char>          ostream;
60*58b9f456SAndroid Build Coastguard Workertypedef basic_iostream<char>         iostream;
61*58b9f456SAndroid Build Coastguard Worker
62*58b9f456SAndroid Build Coastguard Workertypedef basic_stringbuf<char>        stringbuf;
63*58b9f456SAndroid Build Coastguard Workertypedef basic_istringstream<char>    istringstream;
64*58b9f456SAndroid Build Coastguard Workertypedef basic_ostringstream<char>    ostringstream;
65*58b9f456SAndroid Build Coastguard Workertypedef basic_stringstream<char>     stringstream;
66*58b9f456SAndroid Build Coastguard Worker
67*58b9f456SAndroid Build Coastguard Workertypedef basic_filebuf<char>          filebuf;
68*58b9f456SAndroid Build Coastguard Workertypedef basic_ifstream<char>         ifstream;
69*58b9f456SAndroid Build Coastguard Workertypedef basic_ofstream<char>         ofstream;
70*58b9f456SAndroid Build Coastguard Workertypedef basic_fstream<char>          fstream;
71*58b9f456SAndroid Build Coastguard Worker
72*58b9f456SAndroid Build Coastguard Workertypedef basic_streambuf<wchar_t>     wstreambuf;
73*58b9f456SAndroid Build Coastguard Workertypedef basic_istream<wchar_t>       wistream;
74*58b9f456SAndroid Build Coastguard Workertypedef basic_ostream<wchar_t>       wostream;
75*58b9f456SAndroid Build Coastguard Workertypedef basic_iostream<wchar_t>      wiostream;
76*58b9f456SAndroid Build Coastguard Worker
77*58b9f456SAndroid Build Coastguard Workertypedef basic_stringbuf<wchar_t>     wstringbuf;
78*58b9f456SAndroid Build Coastguard Workertypedef basic_istringstream<wchar_t> wistringstream;
79*58b9f456SAndroid Build Coastguard Workertypedef basic_ostringstream<wchar_t> wostringstream;
80*58b9f456SAndroid Build Coastguard Workertypedef basic_stringstream<wchar_t>  wstringstream;
81*58b9f456SAndroid Build Coastguard Worker
82*58b9f456SAndroid Build Coastguard Workertypedef basic_filebuf<wchar_t>       wfilebuf;
83*58b9f456SAndroid Build Coastguard Workertypedef basic_ifstream<wchar_t>      wifstream;
84*58b9f456SAndroid Build Coastguard Workertypedef basic_ofstream<wchar_t>      wofstream;
85*58b9f456SAndroid Build Coastguard Workertypedef basic_fstream<wchar_t>       wfstream;
86*58b9f456SAndroid Build Coastguard Worker
87*58b9f456SAndroid Build Coastguard Workertemplate <class state> class fpos;
88*58b9f456SAndroid Build Coastguard Workertypedef fpos<char_traits<char>::state_type>    streampos;
89*58b9f456SAndroid Build Coastguard Workertypedef fpos<char_traits<wchar_t>::state_type> wstreampos;
90*58b9f456SAndroid Build Coastguard Worker
91*58b9f456SAndroid Build Coastguard Worker}  // std
92*58b9f456SAndroid Build Coastguard Worker
93*58b9f456SAndroid Build Coastguard Worker*/
94*58b9f456SAndroid Build Coastguard Worker
95*58b9f456SAndroid Build Coastguard Worker#include <__config>
96*58b9f456SAndroid Build Coastguard Worker#include <wchar.h>  // for mbstate_t
97*58b9f456SAndroid Build Coastguard Worker
98*58b9f456SAndroid Build Coastguard Worker#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
99*58b9f456SAndroid Build Coastguard Worker#pragma GCC system_header
100*58b9f456SAndroid Build Coastguard Worker#endif
101*58b9f456SAndroid Build Coastguard Worker
102*58b9f456SAndroid Build Coastguard Worker_LIBCPP_BEGIN_NAMESPACE_STD
103*58b9f456SAndroid Build Coastguard Worker
104*58b9f456SAndroid Build Coastguard Workerclass _LIBCPP_TYPE_VIS ios_base;
105*58b9f456SAndroid Build Coastguard Worker
106*58b9f456SAndroid Build Coastguard Workertemplate<class _CharT>  struct _LIBCPP_TEMPLATE_VIS char_traits;
107*58b9f456SAndroid Build Coastguard Workertemplate<> struct char_traits<char>;
108*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_NO_HAS_CHAR8_T
109*58b9f456SAndroid Build Coastguard Workertemplate<> struct char_traits<char8_t>;
110*58b9f456SAndroid Build Coastguard Worker#endif
111*58b9f456SAndroid Build Coastguard Workertemplate<> struct char_traits<char16_t>;
112*58b9f456SAndroid Build Coastguard Workertemplate<> struct char_traits<char32_t>;
113*58b9f456SAndroid Build Coastguard Workertemplate<> struct char_traits<wchar_t>;
114*58b9f456SAndroid Build Coastguard Worker
115*58b9f456SAndroid Build Coastguard Workertemplate<class _Tp>     class _LIBCPP_TEMPLATE_VIS allocator;
116*58b9f456SAndroid Build Coastguard Worker
117*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
118*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_ios;
119*58b9f456SAndroid Build Coastguard Worker
120*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
121*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_streambuf;
122*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
123*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_istream;
124*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
125*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_ostream;
126*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
127*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_iostream;
128*58b9f456SAndroid Build Coastguard Worker
129*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT>,
130*58b9f456SAndroid Build Coastguard Worker          class _Allocator = allocator<_CharT> >
131*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
132*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT>,
133*58b9f456SAndroid Build Coastguard Worker          class _Allocator = allocator<_CharT> >
134*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
135*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT>,
136*58b9f456SAndroid Build Coastguard Worker          class _Allocator = allocator<_CharT> >
137*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
138*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT>,
139*58b9f456SAndroid Build Coastguard Worker          class _Allocator = allocator<_CharT> >
140*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
141*58b9f456SAndroid Build Coastguard Worker
142*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
143*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_filebuf;
144*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
145*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_ifstream;
146*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
147*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_ofstream;
148*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
149*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_fstream;
150*58b9f456SAndroid Build Coastguard Worker
151*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
152*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
153*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT, class _Traits = char_traits<_CharT> >
154*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
155*58b9f456SAndroid Build Coastguard Worker
156*58b9f456SAndroid Build Coastguard Workertypedef basic_ios<char>              ios;
157*58b9f456SAndroid Build Coastguard Workertypedef basic_ios<wchar_t>           wios;
158*58b9f456SAndroid Build Coastguard Worker
159*58b9f456SAndroid Build Coastguard Workertypedef basic_streambuf<char>        streambuf;
160*58b9f456SAndroid Build Coastguard Workertypedef basic_istream<char>          istream;
161*58b9f456SAndroid Build Coastguard Workertypedef basic_ostream<char>          ostream;
162*58b9f456SAndroid Build Coastguard Workertypedef basic_iostream<char>         iostream;
163*58b9f456SAndroid Build Coastguard Worker
164*58b9f456SAndroid Build Coastguard Workertypedef basic_stringbuf<char>        stringbuf;
165*58b9f456SAndroid Build Coastguard Workertypedef basic_istringstream<char>    istringstream;
166*58b9f456SAndroid Build Coastguard Workertypedef basic_ostringstream<char>    ostringstream;
167*58b9f456SAndroid Build Coastguard Workertypedef basic_stringstream<char>     stringstream;
168*58b9f456SAndroid Build Coastguard Worker
169*58b9f456SAndroid Build Coastguard Workertypedef basic_filebuf<char>          filebuf;
170*58b9f456SAndroid Build Coastguard Workertypedef basic_ifstream<char>         ifstream;
171*58b9f456SAndroid Build Coastguard Workertypedef basic_ofstream<char>         ofstream;
172*58b9f456SAndroid Build Coastguard Workertypedef basic_fstream<char>          fstream;
173*58b9f456SAndroid Build Coastguard Worker
174*58b9f456SAndroid Build Coastguard Workertypedef basic_streambuf<wchar_t>     wstreambuf;
175*58b9f456SAndroid Build Coastguard Workertypedef basic_istream<wchar_t>       wistream;
176*58b9f456SAndroid Build Coastguard Workertypedef basic_ostream<wchar_t>       wostream;
177*58b9f456SAndroid Build Coastguard Workertypedef basic_iostream<wchar_t>      wiostream;
178*58b9f456SAndroid Build Coastguard Worker
179*58b9f456SAndroid Build Coastguard Workertypedef basic_stringbuf<wchar_t>     wstringbuf;
180*58b9f456SAndroid Build Coastguard Workertypedef basic_istringstream<wchar_t> wistringstream;
181*58b9f456SAndroid Build Coastguard Workertypedef basic_ostringstream<wchar_t> wostringstream;
182*58b9f456SAndroid Build Coastguard Workertypedef basic_stringstream<wchar_t>  wstringstream;
183*58b9f456SAndroid Build Coastguard Worker
184*58b9f456SAndroid Build Coastguard Workertypedef basic_filebuf<wchar_t>       wfilebuf;
185*58b9f456SAndroid Build Coastguard Workertypedef basic_ifstream<wchar_t>      wifstream;
186*58b9f456SAndroid Build Coastguard Workertypedef basic_ofstream<wchar_t>      wofstream;
187*58b9f456SAndroid Build Coastguard Workertypedef basic_fstream<wchar_t>       wfstream;
188*58b9f456SAndroid Build Coastguard Worker
189*58b9f456SAndroid Build Coastguard Workertemplate <class _State>             class _LIBCPP_TEMPLATE_VIS fpos;
190*58b9f456SAndroid Build Coastguard Workertypedef fpos<mbstate_t>    streampos;
191*58b9f456SAndroid Build Coastguard Workertypedef fpos<mbstate_t>    wstreampos;
192*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_NO_HAS_CHAR8_T
193*58b9f456SAndroid Build Coastguard Workertypedef fpos<mbstate_t>    u8streampos;
194*58b9f456SAndroid Build Coastguard Worker#endif
195*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
196*58b9f456SAndroid Build Coastguard Workertypedef fpos<mbstate_t>    u16streampos;
197*58b9f456SAndroid Build Coastguard Workertypedef fpos<mbstate_t>    u32streampos;
198*58b9f456SAndroid Build Coastguard Worker#endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
199*58b9f456SAndroid Build Coastguard Worker
200*58b9f456SAndroid Build Coastguard Worker#if defined(_NEWLIB_VERSION)
201*58b9f456SAndroid Build Coastguard Worker// On newlib, off_t is 'long int'
202*58b9f456SAndroid Build Coastguard Workertypedef long int streamoff;         // for char_traits in <string>
203*58b9f456SAndroid Build Coastguard Worker#else
204*58b9f456SAndroid Build Coastguard Workertypedef long long streamoff;        // for char_traits in <string>
205*58b9f456SAndroid Build Coastguard Worker#endif
206*58b9f456SAndroid Build Coastguard Worker
207*58b9f456SAndroid Build Coastguard Workertemplate <class _CharT,             // for <stdexcept>
208*58b9f456SAndroid Build Coastguard Worker          class _Traits = char_traits<_CharT>,
209*58b9f456SAndroid Build Coastguard Worker          class _Allocator = allocator<_CharT> >
210*58b9f456SAndroid Build Coastguard Worker    class _LIBCPP_TEMPLATE_VIS basic_string;
211*58b9f456SAndroid Build Coastguard Workertypedef basic_string<char, char_traits<char>, allocator<char> > string;
212*58b9f456SAndroid Build Coastguard Workertypedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
213*58b9f456SAndroid Build Coastguard Worker
214*58b9f456SAndroid Build Coastguard Worker
215*58b9f456SAndroid Build Coastguard Worker// Include other forward declarations here
216*58b9f456SAndroid Build Coastguard Workertemplate <class _Tp, class _Alloc = allocator<_Tp> >
217*58b9f456SAndroid Build Coastguard Workerclass _LIBCPP_TEMPLATE_VIS vector;
218*58b9f456SAndroid Build Coastguard Worker
219*58b9f456SAndroid Build Coastguard Worker_LIBCPP_END_NAMESPACE_STD
220*58b9f456SAndroid Build Coastguard Worker
221*58b9f456SAndroid Build Coastguard Worker#endif  // _LIBCPP_IOSFWD
222