// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_IOSFWD #define _LIBCPP_IOSFWD /* iosfwd synopsis namespace std { template struct char_traits; template<> struct char_traits; template<> struct char_traits; // C++20 template<> struct char_traits; template<> struct char_traits; template<> struct char_traits; template class allocator; template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template , class Allocator = allocator > class basic_stringbuf; template , class Allocator = allocator > class basic_istringstream; template , class Allocator = allocator > class basic_ostringstream; template , class Allocator = allocator > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; typedef basic_ios ios; typedef basic_ios wios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; template class fpos; using streampos = fpos::state_type>; using wstreampos = fpos::state_type>; using u8streampos = fpos::state_type>; // C++20 using u16streampos = fpos::state_type>; using u32streampos = fpos::state_type>; template , class Allocator = allocator> class basic_syncbuf; // C++20 using syncbuf = basic_syncbuf; // C++20 using wsyncbuf = basic_syncbuf; // C++20 template , class Allocator = allocator> class basic_osyncstream; // C++20 using osyncstream = basic_osyncstream; // C++20 using wosyncstream = basic_osyncstream; // C++20 } // std */ #include <__config> #include <__fwd/fstream.h> #include <__fwd/ios.h> #include <__fwd/istream.h> #include <__fwd/memory.h> #include <__fwd/ostream.h> #include <__fwd/sstream.h> #include <__fwd/streambuf.h> #include <__fwd/string.h> #include <__std_mbstate_t.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD template > class _LIBCPP_TEMPLATE_VIS istreambuf_iterator; template > class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator; template class _LIBCPP_TEMPLATE_VIS fpos; typedef fpos streampos; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS typedef fpos wstreampos; #endif #ifndef _LIBCPP_HAS_NO_CHAR8_T typedef fpos u8streampos; #endif typedef fpos u16streampos; typedef fpos u32streampos; #if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM) template , class _Allocator = allocator<_CharT>> class basic_syncbuf; using syncbuf = basic_syncbuf; # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS using wsyncbuf = basic_syncbuf; # endif template , class _Allocator = allocator<_CharT>> class basic_osyncstream; using osyncstream = basic_osyncstream; # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS using wosyncstream = basic_osyncstream; # endif #endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM) template class __save_flags { typedef basic_ios<_CharT, _Traits> __stream_type; typedef typename __stream_type::fmtflags fmtflags; __stream_type& __stream_; fmtflags __fmtflags_; _CharT __fill_; public: __save_flags(const __save_flags&) = delete; __save_flags& operator=(const __save_flags&) = delete; _LIBCPP_HIDE_FROM_ABI explicit __save_flags(__stream_type& __stream) : __stream_(__stream), __fmtflags_(__stream.flags()), __fill_(__stream.fill()) {} _LIBCPP_HIDE_FROM_ABI ~__save_flags() { __stream_.flags(__fmtflags_); __stream_.fill(__fill_); } }; _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_IOSFWD