libstdc++: iosfwd_file.h Source File

libstdc++

iosfwd_file.h
Go to the documentation of this file.
1// <iosfwd> Forward declarations for <fstream> -*- C++ -*-
2
3// Copyright (C) 1997-2026 Free Software Foundation, Inc.
4//
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 3, or (at your option)
9// any later version.
10
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.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file include/bits/iosfwd_file.h
26 * This is an internal header file, included by other library headers.
27 * Do not attempt to use it directly. @headername{iosfwd}
28 */
29
30#ifndef _GLIBCXX_IOSFWD_FILE_H
31#define _GLIBCXX_IOSFWD_FILE_H 1
32
33#ifdef _GLIBCXX_SYSHDR
34#pragma GCC system_header
35#endif
36
37#include <bits/requires_hosted.h> // iostreams
38
39#include <bits/iosfwd.h>
40
41namespace std _GLIBCXX_VISIBILITY(default)
42{
43_GLIBCXX_BEGIN_NAMESPACE_VERSION
44
45 /**
46 * @addtogroup io
47 * @{
48 */
49 template<typename _CharT, typename _Traits = char_traits<_CharT> >
50 class basic_filebuf;
51
52 template<typename _CharT, typename _Traits = char_traits<_CharT> >
53 class basic_ifstream;
54
55 template<typename _CharT, typename _Traits = char_traits<_CharT> >
56 class basic_ofstream;
57
58 template<typename _CharT, typename _Traits = char_traits<_CharT> >
59 class basic_fstream;
60
61 /// Class for @c char file buffers.
62 typedef basic_filebuf<char> filebuf;
63
64 /// Class for @c char input file streams.
65 typedef basic_ifstream<char> ifstream;
66
67 /// Class for @c char output file streams.
68 typedef basic_ofstream<char> ofstream;
69
70 /// Class for @c char mixed input and output file streams.
71 typedef basic_fstream<char> fstream;
72
73#ifdef _GLIBCXX_USE_WCHAR_T
74 /// Class for @c wchar_t file buffers.
75 typedef basic_filebuf<wchar_t> wfilebuf;
76
77 /// Class for @c wchar_t input file streams.
78 typedef basic_ifstream<wchar_t> wifstream;
79
80 /// Class for @c wchar_t output file streams.
81 typedef basic_ofstream<wchar_t> wofstream;
82
83 /// Class for @c wchar_t mixed input and output file streams.
84 typedef basic_fstream<wchar_t> wfstream;
85#endif
86 /// @}
87
88_GLIBCXX_END_NAMESPACE_VERSION
89} // namespace
90
91#endif /* _GLIBCXX_IOSFWD_FILE_H */
requires_hosted.h
std::wifstream
basic_ifstream< wchar_t > wifstream
Class for wchar_t input file streams.
Definition iosfwd_file.h:78
std::ifstream
basic_ifstream< char > ifstream
Class for char input file streams.
Definition iosfwd_file.h:65
std::wfstream
basic_fstream< wchar_t > wfstream
Class for wchar_t mixed input and output file streams.
Definition iosfwd_file.h:84
std::ofstream
basic_ofstream< char > ofstream
Class for char output file streams.
Definition iosfwd_file.h:68
std::filebuf
basic_filebuf< char > filebuf
Class for char file buffers.
Definition iosfwd_file.h:62
std::wfilebuf
basic_filebuf< wchar_t > wfilebuf
Class for wchar_t file buffers.
Definition iosfwd_file.h:75
std::wofstream
basic_ofstream< wchar_t > wofstream
Class for wchar_t output file streams.
Definition iosfwd_file.h:81
std::fstream
basic_fstream< char > fstream
Class for char mixed input and output file streams.
Definition iosfwd_file.h:71
std
ISO C++ entities toplevel namespace is std.
std::basic_filebuf
The actual work of input and output (for files).
Definition fstream:94
std::basic_ifstream
Controlling input for files.
Definition fstream:537
std::basic_ofstream
Controlling output for files.
Definition fstream:810
std::basic_fstream
Controlling input and output for files.
Definition fstream:1085