libstdc++: iosfwd_string.h Source File

libstdc++

iosfwd_string.h
Go to the documentation of this file.
1// <iosfwd> Forward declarations for <sstream> -*- 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_string.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_STRING_H
31#define _GLIBCXX_IOSFWD_STRING_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#include <bits/stringfwd.h> // For string forward declarations.
41
42namespace std _GLIBCXX_VISIBILITY(default)
43{
44_GLIBCXX_BEGIN_NAMESPACE_VERSION
45
46 /**
47 * @addtogroup io
48 * @{
49 */
50
51_GLIBCXX_BEGIN_NAMESPACE_CXX11
52
53 template<typename _CharT, typename _Traits = char_traits<_CharT>,
54 typename _Alloc = allocator<_CharT> >
55 class basic_stringbuf;
56
57 template<typename _CharT, typename _Traits = char_traits<_CharT>,
58 typename _Alloc = allocator<_CharT> >
59 class basic_istringstream;
60
61 template<typename _CharT, typename _Traits = char_traits<_CharT>,
62 typename _Alloc = allocator<_CharT> >
63 class basic_ostringstream;
64
65 template<typename _CharT, typename _Traits = char_traits<_CharT>,
66 typename _Alloc = allocator<_CharT> >
67 class basic_stringstream;
68
69_GLIBCXX_END_NAMESPACE_CXX11
70
71 /// Class for @c char memory buffers.
72 typedef basic_stringbuf<char> stringbuf;
73
74 /// Class for @c char input memory streams.
75 typedef basic_istringstream<char> istringstream;
76
77 /// Class for @c char output memory streams.
78 typedef basic_ostringstream<char> ostringstream;
79
80 /// Class for @c char mixed input and output memory streams.
81 typedef basic_stringstream<char> stringstream;
82
83#ifdef _GLIBCXX_USE_WCHAR_T
84 /// Class for @c wchar_t memory buffers.
85 typedef basic_stringbuf<wchar_t> wstringbuf;
86
87 /// Class for @c wchar_t input memory streams.
88 typedef basic_istringstream<wchar_t> wistringstream;
89
90 /// Class for @c wchar_t output memory streams.
91 typedef basic_ostringstream<wchar_t> wostringstream;
92
93 /// Class for @c wchar_t mixed input and output memory streams.
94 typedef basic_stringstream<wchar_t> wstringstream;
95#endif
96 /// @}
97
98_GLIBCXX_END_NAMESPACE_VERSION
99} // namespace
100
101#endif /* _GLIBCXX_IOSFWD_STRING_H */
requires_hosted.h
stringfwd.h
std::stringstream
basic_stringstream< char > stringstream
Class for char mixed input and output memory streams.
Definition iosfwd_string.h:81
std::wstringbuf
basic_stringbuf< wchar_t > wstringbuf
Class for wchar_t memory buffers.
Definition iosfwd_string.h:85
std::istringstream
basic_istringstream< char > istringstream
Class for char input memory streams.
Definition iosfwd_string.h:75
std::wistringstream
basic_istringstream< wchar_t > wistringstream
Class for wchar_t input memory streams.
Definition iosfwd_string.h:88
std::wostringstream
basic_ostringstream< wchar_t > wostringstream
Class for wchar_t output memory streams.
Definition iosfwd_string.h:91
std::wstringstream
basic_stringstream< wchar_t > wstringstream
Class for wchar_t mixed input and output memory streams.
Definition iosfwd_string.h:94
std::ostringstream
basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition iosfwd_string.h:78
std::stringbuf
basic_stringbuf< char > stringbuf
Class for char memory buffers.
Definition iosfwd_string.h:72
std
ISO C++ entities toplevel namespace is std.
std::basic_stringbuf
The actual work of input and output (for std::string).
Definition sstream:89
std::basic_istringstream
Controlling input for std::string.
Definition sstream:610
std::basic_ostringstream
Controlling output for std::string.
Definition sstream:876
std::basic_stringstream
Controlling input and output for std::string.
Definition sstream:1142