comparison libcxx/include/iosfwd @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
82 typedef basic_ifstream<wchar_t> wifstream; 82 typedef basic_ifstream<wchar_t> wifstream;
83 typedef basic_ofstream<wchar_t> wofstream; 83 typedef basic_ofstream<wchar_t> wofstream;
84 typedef basic_fstream<wchar_t> wfstream; 84 typedef basic_fstream<wchar_t> wfstream;
85 85
86 template <class state> class fpos; 86 template <class state> class fpos;
87 typedef fpos<char_traits<char>::state_type> streampos; 87 using streampos = fpos<char_traits<char>::state_type>;
88 typedef fpos<char_traits<wchar_t>::state_type> wstreampos; 88 using wstreampos = fpos<char_traits<wchar_t>::state_type>;
89 using u8streampos = fpos<char_traits<char8_t>::state_type>; // C++20
90 using u16streampos = fpos<char_traits<char16_t>::state_type>;
91 using u32streampos = fpos<char_traits<char32_t>::state_type>;
89 92
90 } // std 93 } // std
91 94
92 */ 95 */
93 96
102 105
103 class _LIBCPP_TYPE_VIS ios_base; 106 class _LIBCPP_TYPE_VIS ios_base;
104 107
105 template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits; 108 template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;
106 template<> struct char_traits<char>; 109 template<> struct char_traits<char>;
107 #ifndef _LIBCPP_NO_HAS_CHAR8_T 110 #ifndef _LIBCPP_HAS_NO_CHAR8_T
108 template<> struct char_traits<char8_t>; 111 template<> struct char_traits<char8_t>;
109 #endif 112 #endif
110 template<> struct char_traits<char16_t>; 113 template<> struct char_traits<char16_t>;
111 template<> struct char_traits<char32_t>; 114 template<> struct char_traits<char32_t>;
112 template<> struct char_traits<wchar_t>; 115 template<> struct char_traits<wchar_t>;
183 typedef basic_filebuf<wchar_t> wfilebuf; 186 typedef basic_filebuf<wchar_t> wfilebuf;
184 typedef basic_ifstream<wchar_t> wifstream; 187 typedef basic_ifstream<wchar_t> wifstream;
185 typedef basic_ofstream<wchar_t> wofstream; 188 typedef basic_ofstream<wchar_t> wofstream;
186 typedef basic_fstream<wchar_t> wfstream; 189 typedef basic_fstream<wchar_t> wfstream;
187 190
191 template <class _CharT, class _Traits>
192 class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_PREFERRED_NAME(wios) basic_ios;
193
194 template <class _CharT, class _Traits>
195 class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_PREFERRED_NAME(wstreambuf) basic_streambuf;
196 template <class _CharT, class _Traits>
197 class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_PREFERRED_NAME(wistream) basic_istream;
198 template <class _CharT, class _Traits>
199 class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_PREFERRED_NAME(wostream) basic_ostream;
200 template <class _CharT, class _Traits>
201 class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_PREFERRED_NAME(wiostream) basic_iostream;
202
203 template <class _CharT, class _Traits, class _Allocator>
204 class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_PREFERRED_NAME(wstringbuf) basic_stringbuf;
205 template <class _CharT, class _Traits, class _Allocator>
206 class _LIBCPP_PREFERRED_NAME(istringstream) _LIBCPP_PREFERRED_NAME(wistringstream) basic_istringstream;
207 template <class _CharT, class _Traits, class _Allocator>
208 class _LIBCPP_PREFERRED_NAME(ostringstream) _LIBCPP_PREFERRED_NAME(wostringstream) basic_ostringstream;
209 template <class _CharT, class _Traits, class _Allocator>
210 class _LIBCPP_PREFERRED_NAME(stringstream) _LIBCPP_PREFERRED_NAME(wstringstream) basic_stringstream;
211
212 template <class _CharT, class _Traits>
213 class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_PREFERRED_NAME(wfilebuf) basic_filebuf;
214 template <class _CharT, class _Traits>
215 class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_PREFERRED_NAME(wifstream) basic_ifstream;
216 template <class _CharT, class _Traits>
217 class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_PREFERRED_NAME(wofstream) basic_ofstream;
218 template <class _CharT, class _Traits>
219 class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_PREFERRED_NAME(wfstream) basic_fstream;
220
188 template <class _State> class _LIBCPP_TEMPLATE_VIS fpos; 221 template <class _State> class _LIBCPP_TEMPLATE_VIS fpos;
189 typedef fpos<mbstate_t> streampos; 222 typedef fpos<mbstate_t> streampos;
190 typedef fpos<mbstate_t> wstreampos; 223 typedef fpos<mbstate_t> wstreampos;
191 #ifndef _LIBCPP_NO_HAS_CHAR8_T 224 #ifndef _LIBCPP_HAS_NO_CHAR8_T
192 typedef fpos<mbstate_t> u8streampos; 225 typedef fpos<mbstate_t> u8streampos;
193 #endif 226 #endif
194 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS 227 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
195 typedef fpos<mbstate_t> u16streampos; 228 typedef fpos<mbstate_t> u16streampos;
196 typedef fpos<mbstate_t> u32streampos; 229 typedef fpos<mbstate_t> u32streampos;
197 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS 230 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
198 231
199 #if defined(_NEWLIB_VERSION) 232 #if defined(_NEWLIB_VERSION)
200 // On newlib, off_t is 'long int' 233 // On newlib, off_t is 'long int'
201 typedef long int streamoff; // for char_traits in <string> 234 typedef long int streamoff; // for char_traits in <string>
202 #else 235 #else
208 class _Allocator = allocator<_CharT> > 241 class _Allocator = allocator<_CharT> >
209 class _LIBCPP_TEMPLATE_VIS basic_string; 242 class _LIBCPP_TEMPLATE_VIS basic_string;
210 typedef basic_string<char, char_traits<char>, allocator<char> > string; 243 typedef basic_string<char, char_traits<char>, allocator<char> > string;
211 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring; 244 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
212 245
246 template <class _CharT, class _Traits, class _Allocator>
247 class _LIBCPP_PREFERRED_NAME(string) _LIBCPP_PREFERRED_NAME(wstring) basic_string;
213 248
214 // Include other forward declarations here 249 // Include other forward declarations here
215 template <class _Tp, class _Alloc = allocator<_Tp> > 250 template <class _Tp, class _Alloc = allocator<_Tp> >
216 class _LIBCPP_TEMPLATE_VIS vector; 251 class _LIBCPP_TEMPLATE_VIS vector;
217 252
253 template <class _CharT, class _Traits>
254 class __save_flags
255 {
256 typedef basic_ios<_CharT, _Traits> __stream_type;
257 typedef typename __stream_type::fmtflags fmtflags;
258
259 __stream_type& __stream_;
260 fmtflags __fmtflags_;
261 _CharT __fill_;
262
263 __save_flags(const __save_flags&);
264 __save_flags& operator=(const __save_flags&);
265 public:
266 _LIBCPP_INLINE_VISIBILITY
267 explicit __save_flags(__stream_type& __stream)
268 : __stream_(__stream),
269 __fmtflags_(__stream.flags()),
270 __fill_(__stream.fill())
271 {}
272 _LIBCPP_INLINE_VISIBILITY
273 ~__save_flags()
274 {
275 __stream_.flags(__fmtflags_);
276 __stream_.fill(__fill_);
277 }
278 };
279
218 _LIBCPP_END_NAMESPACE_STD 280 _LIBCPP_END_NAMESPACE_STD
219 281
220 #endif // _LIBCPP_IOSFWD 282 #endif // _LIBCPP_IOSFWD