Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/__cxx03/iosfwd is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03_IOSFWD
0011 #define _LIBCPP___CXX03_IOSFWD
0012 
0013 /*
0014     iosfwd synopsis
0015 
0016 namespace std
0017 {
0018 
0019 template<class charT> struct char_traits;
0020 template<>            struct char_traits<char>;
0021 template<>            struct char_traits<char8_t>;  // C++20
0022 template<>            struct char_traits<char16_t>;
0023 template<>            struct char_traits<char32_t>;
0024 template<>            struct char_traits<wchar_t>;
0025 
0026 template<class T>     class allocator;
0027 
0028 template <class charT, class traits = char_traits<charT> > class basic_ios;
0029 
0030 template <class charT, class traits = char_traits<charT> > class basic_streambuf;
0031 template <class charT, class traits = char_traits<charT> > class basic_istream;
0032 template <class charT, class traits = char_traits<charT> > class basic_ostream;
0033 template <class charT, class traits = char_traits<charT> > class basic_iostream;
0034 
0035 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
0036     class basic_stringbuf;
0037 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
0038     class basic_istringstream;
0039 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
0040     class basic_ostringstream;
0041 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
0042     class basic_stringstream;
0043 
0044 template <class charT, class traits = char_traits<charT> > class basic_filebuf;
0045 template <class charT, class traits = char_traits<charT> > class basic_ifstream;
0046 template <class charT, class traits = char_traits<charT> > class basic_ofstream;
0047 template <class charT, class traits = char_traits<charT> > class basic_fstream;
0048 
0049 template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
0050 template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
0051 
0052 typedef basic_ios<char>              ios;
0053 typedef basic_ios<wchar_t>           wios;
0054 
0055 typedef basic_streambuf<char>        streambuf;
0056 typedef basic_istream<char>          istream;
0057 typedef basic_ostream<char>          ostream;
0058 typedef basic_iostream<char>         iostream;
0059 
0060 typedef basic_stringbuf<char>        stringbuf;
0061 typedef basic_istringstream<char>    istringstream;
0062 typedef basic_ostringstream<char>    ostringstream;
0063 typedef basic_stringstream<char>     stringstream;
0064 
0065 typedef basic_filebuf<char>          filebuf;
0066 typedef basic_ifstream<char>         ifstream;
0067 typedef basic_ofstream<char>         ofstream;
0068 typedef basic_fstream<char>          fstream;
0069 
0070 typedef basic_streambuf<wchar_t>     wstreambuf;
0071 typedef basic_istream<wchar_t>       wistream;
0072 typedef basic_ostream<wchar_t>       wostream;
0073 typedef basic_iostream<wchar_t>      wiostream;
0074 
0075 typedef basic_stringbuf<wchar_t>     wstringbuf;
0076 typedef basic_istringstream<wchar_t> wistringstream;
0077 typedef basic_ostringstream<wchar_t> wostringstream;
0078 typedef basic_stringstream<wchar_t>  wstringstream;
0079 
0080 typedef basic_filebuf<wchar_t>       wfilebuf;
0081 typedef basic_ifstream<wchar_t>      wifstream;
0082 typedef basic_ofstream<wchar_t>      wofstream;
0083 typedef basic_fstream<wchar_t>       wfstream;
0084 
0085 template <class state> class fpos;
0086 using streampos  = fpos<char_traits<char>::state_type>;
0087 using wstreampos = fpos<char_traits<wchar_t>::state_type>;
0088 using u8streampos = fpos<char_traits<char8_t>::state_type>; // C++20
0089 using u16streampos = fpos<char_traits<char16_t>::state_type>;
0090 using u32streampos = fpos<char_traits<char32_t>::state_type>;
0091 
0092 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
0093     class basic_syncbuf;                          // C++20
0094 
0095 using syncbuf = basic_syncbuf<char>;              // C++20
0096 using wsyncbuf = basic_syncbuf<wchar_t>;          // C++20
0097 
0098 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
0099     class basic_osyncstream;                      // C++20
0100 
0101 using osyncstream = basic_osyncstream<char>;      // C++20
0102 using wosyncstream = basic_osyncstream<wchar_t>;  // C++20
0103 
0104 }  // std
0105 
0106 */
0107 
0108 #include <__cxx03/__config>
0109 #include <__cxx03/__fwd/fstream.h>
0110 #include <__cxx03/__fwd/ios.h>
0111 #include <__cxx03/__fwd/istream.h>
0112 #include <__cxx03/__fwd/memory.h>
0113 #include <__cxx03/__fwd/ostream.h>
0114 #include <__cxx03/__fwd/sstream.h>
0115 #include <__cxx03/__fwd/streambuf.h>
0116 #include <__cxx03/__fwd/string.h>
0117 #include <__cxx03/__std_mbstate_t.h>
0118 #include <__cxx03/version>
0119 
0120 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0121 #  pragma GCC system_header
0122 #endif
0123 
0124 _LIBCPP_BEGIN_NAMESPACE_STD
0125 
0126 template <class _CharT, class _Traits = char_traits<_CharT> >
0127 class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
0128 template <class _CharT, class _Traits = char_traits<_CharT> >
0129 class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
0130 
0131 template <class _State>
0132 class _LIBCPP_TEMPLATE_VIS fpos;
0133 typedef fpos<mbstate_t> streampos;
0134 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
0135 typedef fpos<mbstate_t> wstreampos;
0136 #endif
0137 #ifndef _LIBCPP_HAS_NO_CHAR8_T
0138 typedef fpos<mbstate_t> u8streampos;
0139 #endif
0140 typedef fpos<mbstate_t> u16streampos;
0141 typedef fpos<mbstate_t> u32streampos;
0142 
0143 #if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)
0144 
0145 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
0146 class basic_syncbuf;
0147 
0148 using syncbuf = basic_syncbuf<char>;
0149 #  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
0150 using wsyncbuf = basic_syncbuf<wchar_t>;
0151 #  endif
0152 
0153 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
0154 class basic_osyncstream;
0155 
0156 using osyncstream = basic_osyncstream<char>;
0157 #  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
0158 using wosyncstream = basic_osyncstream<wchar_t>;
0159 #  endif
0160 
0161 #endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)
0162 
0163 template <class _CharT, class _Traits>
0164 class __save_flags {
0165   typedef basic_ios<_CharT, _Traits> __stream_type;
0166   typedef typename __stream_type::fmtflags fmtflags;
0167 
0168   __stream_type& __stream_;
0169   fmtflags __fmtflags_;
0170   _CharT __fill_;
0171 
0172 public:
0173   __save_flags(const __save_flags&)            = delete;
0174   __save_flags& operator=(const __save_flags&) = delete;
0175 
0176   _LIBCPP_HIDE_FROM_ABI explicit __save_flags(__stream_type& __stream)
0177       : __stream_(__stream), __fmtflags_(__stream.flags()), __fill_(__stream.fill()) {}
0178   _LIBCPP_HIDE_FROM_ABI ~__save_flags() {
0179     __stream_.flags(__fmtflags_);
0180     __stream_.fill(__fill_);
0181   }
0182 };
0183 
0184 _LIBCPP_END_NAMESPACE_STD
0185 
0186 #endif // _LIBCPP___CXX03_IOSFWD