#include <bits/c++config.h>
#include <bits/c++io.h> // for __c_lock and __c_file
#include <bits/move.h> // for swap
-#include <ios>
+#include <bits/ios_base.h> // For ios_base declarations.
namespace std _GLIBCXX_VISIBILITY(default)
{
${bits_srcdir}/functional_hash.h \
${bits_srcdir}/intcmp.h \
${bits_srcdir}/invoke.h \
+ ${bits_srcdir}/iosfwd.h \
+ ${bits_srcdir}/iosfwd_file.h \
+ ${bits_srcdir}/iosfwd_span.h \
+ ${bits_srcdir}/iosfwd_string.h \
+ ${bits_srcdir}/iosfwd_sync.h \
${bits_srcdir}/iterator_concepts.h \
${bits_srcdir}/new_except.h \
${bits_srcdir}/new_throw.h \
${bits_srcdir}/functional_hash.h \
${bits_srcdir}/intcmp.h \
${bits_srcdir}/invoke.h \
+ ${bits_srcdir}/iosfwd.h \
+ ${bits_srcdir}/iosfwd_file.h \
+ ${bits_srcdir}/iosfwd_span.h \
+ ${bits_srcdir}/iosfwd_string.h \
+ ${bits_srcdir}/iosfwd_sync.h \
${bits_srcdir}/iterator_concepts.h \
${bits_srcdir}/new_except.h \
${bits_srcdir}/new_throw.h \
#include <type_traits>
#include <locale>
-#include <iosfwd>
#include <iomanip>
#include <codecvt>
#include <string_view>
#include <system_error>
+#include <bits/iosfwd.h>
#include <bits/stl_algobase.h>
#include <bits/stl_pair.h>
#include <bits/locale_conv.h>
--- /dev/null
+// <iosfwd> Forward declarations -*- C++ -*-
+
+// Copyright (C) 1997-2026 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/iosfwd
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_IOSFWD_H
+#define _GLIBCXX_IOSFWD_H 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#include <bits/requires_hosted.h> // iostreams
+
+#include <bits/c++config.h>
+#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @addtogroup io
+ * @{
+ */
+ class ios_base;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ios;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_streambuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_istream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ostream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_iostream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class istreambuf_iterator;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class ostreambuf_iterator;
+
+
+ /// Base class for @c char streams.
+ typedef basic_ios<char> ios;
+
+ /// Base class for @c char buffers.
+ typedef basic_streambuf<char> streambuf;
+
+ /// Base class for @c char input streams.
+ typedef basic_istream<char> istream;
+
+ /// Base class for @c char output streams.
+ typedef basic_ostream<char> ostream;
+
+ /// Base class for @c char mixed input and output streams.
+ typedef basic_iostream<char> iostream;
+
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /// Base class for @c wchar_t streams.
+ typedef basic_ios<wchar_t> wios;
+
+ /// Base class for @c wchar_t buffers.
+ typedef basic_streambuf<wchar_t> wstreambuf;
+
+ /// Base class for @c wchar_t input streams.
+ typedef basic_istream<wchar_t> wistream;
+
+ /// Base class for @c wchar_t output streams.
+ typedef basic_ostream<wchar_t> wostream;
+
+ /// Base class for @c wchar_t mixed input and output streams.
+ typedef basic_iostream<wchar_t> wiostream;
+#endif
+
+ /** @} */
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#endif /* _GLIBCXX_IOSFWD_H */
--- /dev/null
+// <iosfwd> Forward declarations for <fstream> -*- C++ -*-
+
+// Copyright (C) 1997-2026 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/bits/iosfwd_file.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_IOSFWD_FILE_H
+#define _GLIBCXX_IOSFWD_FILE_H 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#include <bits/requires_hosted.h> // iostreams
+
+#include <bits/iosfwd.h>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @addtogroup io
+ * @{
+ */
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_filebuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ifstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ofstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_fstream;
+
+ /// Class for @c char file buffers.
+ typedef basic_filebuf<char> filebuf;
+
+ /// Class for @c char input file streams.
+ typedef basic_ifstream<char> ifstream;
+
+ /// Class for @c char output file streams.
+ typedef basic_ofstream<char> ofstream;
+
+ /// Class for @c char mixed input and output file streams.
+ typedef basic_fstream<char> fstream;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /// Class for @c wchar_t file buffers.
+ typedef basic_filebuf<wchar_t> wfilebuf;
+
+ /// Class for @c wchar_t input file streams.
+ typedef basic_ifstream<wchar_t> wifstream;
+
+ /// Class for @c wchar_t output file streams.
+ typedef basic_ofstream<wchar_t> wofstream;
+
+ /// Class for @c wchar_t mixed input and output file streams.
+ typedef basic_fstream<wchar_t> wfstream;
+#endif
+ /// @}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#endif /* _GLIBCXX_IOSFWD_FILE_H */
--- /dev/null
+// <iosfwd> Forward declarations for <spanstream> -*- C++ -*-
+
+// Copyright (C) 2022-2026 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/bits/iosfwd_span.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_IOSFWD_SPAN_H
+#define _GLIBCXX_IOSFWD_SPAN_H 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#include <bits/requires_hosted.h> // iostreams
+
+#include <bits/version.h>
+
+#ifdef __glibcxx_spanstream // >= C++23
+#include <bits/iosfwd.h>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @addtogroup io
+ * @{
+ */
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>>
+ class basic_spanbuf;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>>
+ class basic_ispanstream;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>>
+ class basic_ospanstream;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>>
+ class basic_spanstream;
+
+ using spanbuf = basic_spanbuf<char>;
+ using ispanstream = basic_ispanstream<char>;
+ using ospanstream = basic_ospanstream<char>;
+ using spanstream = basic_spanstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ using wspanbuf = basic_spanbuf<wchar_t>;
+ using wispanstream = basic_ispanstream<wchar_t>;
+ using wospanstream = basic_ospanstream<wchar_t>;
+ using wspanstream = basic_spanstream<wchar_t>;
+#endif
+ /// @}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+#endif // C++23
+#endif /* _GLIBCXX_IOSFWD_SPAN_H */
--- /dev/null
+// <iosfwd> Forward declarations for <sstream> -*- C++ -*-
+
+// Copyright (C) 1997-2026 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/bits/iosfwd_string.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_IOSFWD_STRING_H
+#define _GLIBCXX_IOSFWD_STRING_H 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#include <bits/requires_hosted.h> // iostreams
+
+#include <bits/iosfwd.h>
+#include <bits/stringfwd.h> // For string forward declarations.
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @addtogroup io
+ * @{
+ */
+
+_GLIBCXX_BEGIN_NAMESPACE_CXX11
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_stringbuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_istringstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_ostringstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_stringstream;
+
+_GLIBCXX_END_NAMESPACE_CXX11
+
+ /// Class for @c char memory buffers.
+ typedef basic_stringbuf<char> stringbuf;
+
+ /// Class for @c char input memory streams.
+ typedef basic_istringstream<char> istringstream;
+
+ /// Class for @c char output memory streams.
+ typedef basic_ostringstream<char> ostringstream;
+
+ /// Class for @c char mixed input and output memory streams.
+ typedef basic_stringstream<char> stringstream;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /// Class for @c wchar_t memory buffers.
+ typedef basic_stringbuf<wchar_t> wstringbuf;
+
+ /// Class for @c wchar_t input memory streams.
+ typedef basic_istringstream<wchar_t> wistringstream;
+
+ /// Class for @c wchar_t output memory streams.
+ typedef basic_ostringstream<wchar_t> wostringstream;
+
+ /// Class for @c wchar_t mixed input and output memory streams.
+ typedef basic_stringstream<wchar_t> wstringstream;
+#endif
+ /// @}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#endif /* _GLIBCXX_IOSFWD_STRING_H */
--- /dev/null
+// <iosfwd> Forward declarations for <syncstream> -*- C++ -*-
+
+// Copyright (C) 2022-2026 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/bits/iosfwd_sync.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_IOSFWD_SYNC_H
+#define _GLIBCXX_IOSFWD_SYNC_H 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#include <bits/requires_hosted.h> // iostreams
+
+#include <bits/version.h>
+
+#ifdef __glibcxx_syncbuf // >= C++20 && CXX11_ABI
+#include <bits/iosfwd.h>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @addtogroup io
+ * @{
+ */
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Allocator = allocator<_CharT>>
+ class basic_syncbuf;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Allocator = allocator<_CharT>>
+ class basic_osyncstream;
+
+ using syncbuf = basic_syncbuf<char>;
+ using osyncstream = basic_osyncstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ using wsyncbuf = basic_syncbuf<wchar_t>;
+ using wosyncstream = basic_osyncstream<wchar_t>;
+#endif
+ /// @}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+#endif // __glibcxx_syncbuf
+#endif /* _GLIBCXX_IOSFWD_SYNC_H */
#include <cwctype> // For wctype_t
#include <cctype>
#include <bits/ctype_base.h>
-#include <iosfwd>
#include <bits/ios_base.h> // For ios_base, ios_base::iostate
-#include <streambuf>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
#include <ext/numeric_traits.h>
#include <bits/c++config.h>
#include <bits/c++locale.h> // Defines __c_locale, config-specific include
-#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
+#include <bits/iosfwd.h> // For ostreambuf_iterator, istreambuf_iterator
#include <cctype>
namespace std _GLIBCXX_VISIBILITY(default)
#include <bits/requires_hosted.h> // iostreams
-#include <ios>
+#include <bits/iosfwd.h> // For declarations of default template args.
+#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
+#include <bits/localefwd.h> // For class locale
+#include <bits/ios_base.h> // For ios_base declarations.
+#include <streambuf>
+#include <bits/basic_ios.h>
#include <bits/ostream_insert.h>
# define __glibcxx_want_print
#pragma GCC system_header
#endif
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <bits/cxxabi_forced.h>
#include <bits/exception_defines.h>
#ifndef _SHARED_PTR_H
#define _SHARED_PTR_H 1
-#include <iosfwd> // std::basic_ostream
+#include <bits/iosfwd.h> // std::basic_ostream
#include <bits/shared_ptr_base.h>
namespace std _GLIBCXX_VISIBILITY(default)
#if __cplusplus >= 201103L
#include <bits/c++config.h>
-#include <iosfwd> // std::basic_ostream
+#include <bits/iosfwd.h> // std::basic_ostream
#include <tuple> // std::tuple
#include <bits/functional_hash.h> // std::hash
#include <bits/invoke.h> // std::__invoke
#pragma GCC system_header
#endif
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <bits/move.h>
#include <bits/stl_iterator_base_types.h>
#include <debug/debug.h>
#include <istream>
#include <ostream>
+#include <bits/iosfwd_file.h>
#include <bits/codecvt.h>
#include <cstdio> // For BUFSIZ
#include <bits/basic_file.h> // For __basic_file, __c_lock
#include <bits/requires_hosted.h> // iostreams
#include <bits/c++config.h>
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <bits/ios_base.h>
#define __glibcxx_want_quoted_string_io
#include <bits/requires_hosted.h> // iostreams
#include <iosfwd>
-#include <exception> // For ios_base::failure
-#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
#include <bits/localefwd.h> // For class locale
#include <bits/ios_base.h> // For ios_base declarations.
#include <streambuf>
#include <bits/requires_hosted.h> // iostreams
-#include <bits/c++config.h>
-#include <bits/stringfwd.h> // For string forward declarations.
-#include <bits/postypes.h>
-
-namespace std _GLIBCXX_VISIBILITY(default)
-{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
/**
* @defgroup io I/O
*
* Nearly all of the I/O classes are parameterized on the type of
- * characters they read and write. (The major exception is ios_base at
+ * characters they read and write. (The major exception is `ios_base` at
* the top of the hierarchy.) This is a change from pre-Standard
* streams, which were not templates.
*
- * For ease of use and compatibility, all of the basic_* I/O-related
+ * For ease of use and compatibility, all of the `basic_*` I/O-related
* classes are given typedef names for both of the builtin character
* widths (wide and narrow). The typedefs are the same as the
* pre-Standard names, for example:
*
- * @code
+ * ```
* typedef basic_ifstream<char> ifstream;
- * @endcode
+ * ```
*
* Because properly forward-declaring these classes can be difficult, you
- * should not do it yourself. Instead, include the <iosfwd>
+ * should not do it yourself. Instead, include the `<iosfwd>`
* header, which contains only declarations of all the I/O classes as
* well as the typedefs. Trying to forward-declare the typedefs
- * themselves (e.g., <code>class ostream;</code>) is not valid ISO C++.
+ * themselves (e.g., `class ostream;`) is not valid ISO C++.
*
* For more specific declarations, see
* https://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html#std.io.objects
- *
- * @{
- */
- class ios_base;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_ios;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_streambuf;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_istream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_ostream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_iostream;
-
-
-_GLIBCXX_BEGIN_NAMESPACE_CXX11
-
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Alloc = allocator<_CharT> >
- class basic_stringbuf;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Alloc = allocator<_CharT> >
- class basic_istringstream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Alloc = allocator<_CharT> >
- class basic_ostringstream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Alloc = allocator<_CharT> >
- class basic_stringstream;
-
-_GLIBCXX_END_NAMESPACE_CXX11
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_filebuf;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_ifstream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_ofstream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class basic_fstream;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class istreambuf_iterator;
-
- template<typename _CharT, typename _Traits = char_traits<_CharT> >
- class ostreambuf_iterator;
-
-
- /// Base class for @c char streams.
- typedef basic_ios<char> ios;
-
- /// Base class for @c char buffers.
- typedef basic_streambuf<char> streambuf;
-
- /// Base class for @c char input streams.
- typedef basic_istream<char> istream;
-
- /// Base class for @c char output streams.
- typedef basic_ostream<char> ostream;
-
- /// Base class for @c char mixed input and output streams.
- typedef basic_iostream<char> iostream;
-
- /// Class for @c char memory buffers.
- typedef basic_stringbuf<char> stringbuf;
-
- /// Class for @c char input memory streams.
- typedef basic_istringstream<char> istringstream;
-
- /// Class for @c char output memory streams.
- typedef basic_ostringstream<char> ostringstream;
-
- /// Class for @c char mixed input and output memory streams.
- typedef basic_stringstream<char> stringstream;
-
- /// Class for @c char file buffers.
- typedef basic_filebuf<char> filebuf;
-
- /// Class for @c char input file streams.
- typedef basic_ifstream<char> ifstream;
-
- /// Class for @c char output file streams.
- typedef basic_ofstream<char> ofstream;
-
- /// Class for @c char mixed input and output file streams.
- typedef basic_fstream<char> fstream;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
- /// Base class for @c wchar_t streams.
- typedef basic_ios<wchar_t> wios;
-
- /// Base class for @c wchar_t buffers.
- typedef basic_streambuf<wchar_t> wstreambuf;
-
- /// Base class for @c wchar_t input streams.
- typedef basic_istream<wchar_t> wistream;
-
- /// Base class for @c wchar_t output streams.
- typedef basic_ostream<wchar_t> wostream;
-
- /// Base class for @c wchar_t mixed input and output streams.
- typedef basic_iostream<wchar_t> wiostream;
-
- /// Class for @c wchar_t memory buffers.
- typedef basic_stringbuf<wchar_t> wstringbuf;
-
- /// Class for @c wchar_t input memory streams.
- typedef basic_istringstream<wchar_t> wistringstream;
-
- /// Class for @c wchar_t output memory streams.
- typedef basic_ostringstream<wchar_t> wostringstream;
-
- /// Class for @c wchar_t mixed input and output memory streams.
- typedef basic_stringstream<wchar_t> wstringstream;
-
- /// Class for @c wchar_t file buffers.
- typedef basic_filebuf<wchar_t> wfilebuf;
-
- /// Class for @c wchar_t input file streams.
- typedef basic_ifstream<wchar_t> wifstream;
-
- /// Class for @c wchar_t output file streams.
- typedef basic_ofstream<wchar_t> wofstream;
-
- /// Class for @c wchar_t mixed input and output file streams.
- typedef basic_fstream<wchar_t> wfstream;
-#endif
-
-#if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Allocator = allocator<_CharT>>
- class basic_syncbuf;
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
- typename _Allocator = allocator<_CharT>>
- class basic_osyncstream;
-
- using syncbuf = basic_syncbuf<char>;
- using osyncstream = basic_osyncstream<char>;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
- using wsyncbuf = basic_syncbuf<wchar_t>;
- using wosyncstream = basic_osyncstream<wchar_t>;
-#endif
-#endif // C++20 && CXX11_ABI
-
-#if __cplusplus > 202002L
- template<typename _CharT, typename _Traits = char_traits<_CharT>>
- class basic_spanbuf;
- template<typename _CharT, typename _Traits = char_traits<_CharT>>
- class basic_ispanstream;
- template<typename _CharT, typename _Traits = char_traits<_CharT>>
- class basic_ospanstream;
- template<typename _CharT, typename _Traits = char_traits<_CharT>>
- class basic_spanstream;
-
- using spanbuf = basic_spanbuf<char>;
- using ispanstream = basic_ispanstream<char>;
- using ospanstream = basic_ospanstream<char>;
- using spanstream = basic_spanstream<char>;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
- using wspanbuf = basic_spanbuf<wchar_t>;
- using wispanstream = basic_ispanstream<wchar_t>;
- using wospanstream = basic_ospanstream<wchar_t>;
- using wspanstream = basic_spanstream<wchar_t>;
-#endif
-#endif // C++23
-
- /** @} */
+ */
-_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace
+#include <bits/iosfwd_file.h>
+#include <bits/iosfwd_string.h>
+#include <bits/iosfwd_sync.h>
+#include <bits/iosfwd_span.h>
#endif /* _GLIBCXX_IOSFWD */
#include <bits/requires_hosted.h> // iostreams
-#include <bits/c++config.h>
+#include <ios>
#include <ostream>
#include <istream>
#include <bits/requires_hosted.h> // iostreams
-#include <ios>
+#include <bits/iosfwd.h> // For declarations of default template args.
+#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
+#include <bits/localefwd.h> // For class locale
+#include <bits/ios_base.h> // For ios_base declarations.
+#include <streambuf>
+#include <bits/basic_ios.h>
+
#include <ostream>
#if __cplusplus > 202302L
#include <cstdint> // For uint_fast32_t, uint_fast64_t, uint_least32_t
#include <cstdlib>
#include <string>
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <limits>
#include <debug/debug.h>
#include <type_traits>
#include <streambuf>
#include <istream>
#include <ostream>
+#include <bits/iosfwd_span.h>
#include <bits/ranges_base.h>
namespace std _GLIBCXX_VISIBILITY(default)
#include <istream>
#include <ostream>
+#include <bits/iosfwd_string.h>
#include <bits/alloc_traits.h> // allocator_traits, __allocator_like
#define __glibcxx_want_sstream_from_string_view
#include <bits/requires_hosted.h> // iostreams
#include <bits/c++config.h>
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <bits/localefwd.h>
#include <bits/ios_base.h>
#include <bits/cpp_type_traits.h>
#endif
#if _GLIBCXX_HOSTED
-# include <iosfwd>
+# include <bits/iosfwd.h>
# include <bits/ostream_insert.h>
#endif
#ifdef __cpp_lib_syncbuf // C++ >= 20 && HOSTED && CXX11ABI
#include <sstream>
+#include <bits/iosfwd_sync.h>
#include <bits/alloc_traits.h>
#include <bits/allocator.h>
#include <bits/std_mutex.h>
#include <bits/c++config.h>
#include <bits/error_constants.h>
-#include <iosfwd>
+#include <bits/iosfwd.h>
#include <stdexcept>
#if __cplusplus > 201703L
# include <compare>