Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/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_IOSFWD
0011 #define _LIBCPP_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 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0109 #  include <__cxx03/iosfwd>
0110 #else
0111 #  include <__config>
0112 #  include <__fwd/fstream.h>
0113 #  include <__fwd/ios.h>
0114 #  include <__fwd/istream.h>
0115 #  include <__fwd/memory.h>
0116 #  include <__fwd/ostream.h>
0117 #  include <__fwd/sstream.h>
0118 #  include <__fwd/streambuf.h>
0119 #  include <__fwd/string.h>
0120 #  include <__std_mbstate_t.h>
0121 #  include <version>
0122 
0123 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0124 #    pragma GCC system_header
0125 #  endif
0126 
0127 _LIBCPP_BEGIN_NAMESPACE_STD
0128 
0129 template <class _CharT, class _Traits = char_traits<_CharT> >
0130 class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
0131 template <class _CharT, class _Traits = char_traits<_CharT> >
0132 class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
0133 
0134 template <class _State>
0135 class _LIBCPP_TEMPLATE_VIS fpos;
0136 typedef fpos<mbstate_t> streampos;
0137 #  if _LIBCPP_HAS_WIDE_CHARACTERS
0138 typedef fpos<mbstate_t> wstreampos;
0139 #  endif
0140 #  if _LIBCPP_HAS_CHAR8_T
0141 typedef fpos<mbstate_t> u8streampos;
0142 #  endif
0143 typedef fpos<mbstate_t> u16streampos;
0144 typedef fpos<mbstate_t> u32streampos;
0145 
0146 #  if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM
0147 
0148 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
0149 class basic_syncbuf;
0150 
0151 using syncbuf = basic_syncbuf<char>;
0152 #    if _LIBCPP_HAS_WIDE_CHARACTERS
0153 using wsyncbuf = basic_syncbuf<wchar_t>;
0154 #    endif
0155 
0156 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
0157 class basic_osyncstream;
0158 
0159 using osyncstream = basic_osyncstream<char>;
0160 #    if _LIBCPP_HAS_WIDE_CHARACTERS
0161 using wosyncstream = basic_osyncstream<wchar_t>;
0162 #    endif
0163 
0164 #  endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM
0165 
0166 template <class _CharT, class _Traits>
0167 class __save_flags {
0168   typedef basic_ios<_CharT, _Traits> __stream_type;
0169   typedef typename __stream_type::fmtflags fmtflags;
0170 
0171   __stream_type& __stream_;
0172   fmtflags __fmtflags_;
0173   _CharT __fill_;
0174 
0175 public:
0176   __save_flags(const __save_flags&)            = delete;
0177   __save_flags& operator=(const __save_flags&) = delete;
0178 
0179   _LIBCPP_HIDE_FROM_ABI explicit __save_flags(__stream_type& __stream)
0180       : __stream_(__stream), __fmtflags_(__stream.flags()), __fill_(__stream.fill()) {}
0181   _LIBCPP_HIDE_FROM_ABI ~__save_flags() {
0182     __stream_.flags(__fmtflags_);
0183     __stream_.fill(__fill_);
0184   }
0185 };
0186 
0187 _LIBCPP_END_NAMESPACE_STD
0188 
0189 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0190 
0191 #endif // _LIBCPP_IOSFWD