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