blob: 6e8360f4ab5654d69d2d0596afc0c2d668d39309 [file] [log] [blame]
Howard Hinnantc51e1022010-05-11 19:42:16 +00001// -*- C++ -*-
Louis Dionne9bd93882021-11-17 16:25:01 -05002//===----------------------------------------------------------------------===//
Howard Hinnantc51e1022010-05-11 19:42:16 +00003//
Chandler Carruthd2012102019-01-19 10:56:40 +00004// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Howard Hinnantc51e1022010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_IOS
11#define _LIBCPP_IOS
12
13/*
14 ios synopsis
15
16#include <iosfwd>
17
18namespace std
19{
20
21typedef OFF_T streamoff;
22typedef SZ_T streamsize;
23template <class stateT> class fpos;
24
25class ios_base
26{
27public:
28 class failure;
29
30 typedef T1 fmtflags;
Howard Hinnant770a3662012-07-21 01:03:40 +000031 static constexpr fmtflags boolalpha;
32 static constexpr fmtflags dec;
33 static constexpr fmtflags fixed;
34 static constexpr fmtflags hex;
35 static constexpr fmtflags internal;
36 static constexpr fmtflags left;
37 static constexpr fmtflags oct;
38 static constexpr fmtflags right;
39 static constexpr fmtflags scientific;
40 static constexpr fmtflags showbase;
41 static constexpr fmtflags showpoint;
42 static constexpr fmtflags showpos;
43 static constexpr fmtflags skipws;
44 static constexpr fmtflags unitbuf;
45 static constexpr fmtflags uppercase;
46 static constexpr fmtflags adjustfield;
47 static constexpr fmtflags basefield;
48 static constexpr fmtflags floatfield;
Howard Hinnantc51e1022010-05-11 19:42:16 +000049
50 typedef T2 iostate;
Howard Hinnant770a3662012-07-21 01:03:40 +000051 static constexpr iostate badbit;
52 static constexpr iostate eofbit;
53 static constexpr iostate failbit;
54 static constexpr iostate goodbit;
Howard Hinnantc51e1022010-05-11 19:42:16 +000055
56 typedef T3 openmode;
Howard Hinnant770a3662012-07-21 01:03:40 +000057 static constexpr openmode app;
58 static constexpr openmode ate;
59 static constexpr openmode binary;
60 static constexpr openmode in;
61 static constexpr openmode out;
62 static constexpr openmode trunc;
Howard Hinnantc51e1022010-05-11 19:42:16 +000063
64 typedef T4 seekdir;
Howard Hinnant770a3662012-07-21 01:03:40 +000065 static constexpr seekdir beg;
66 static constexpr seekdir cur;
67 static constexpr seekdir end;
Howard Hinnantc51e1022010-05-11 19:42:16 +000068
69 class Init;
70
71 // 27.5.2.2 fmtflags state:
72 fmtflags flags() const;
73 fmtflags flags(fmtflags fmtfl);
74 fmtflags setf(fmtflags fmtfl);
75 fmtflags setf(fmtflags fmtfl, fmtflags mask);
76 void unsetf(fmtflags mask);
77
78 streamsize precision() const;
79 streamsize precision(streamsize prec);
80 streamsize width() const;
81 streamsize width(streamsize wide);
82
83 // 27.5.2.3 locales:
84 locale imbue(const locale& loc);
85 locale getloc() const;
86
87 // 27.5.2.5 storage:
88 static int xalloc();
89 long& iword(int index);
90 void*& pword(int index);
91
92 // destructor
93 virtual ~ios_base();
94
95 // 27.5.2.6 callbacks;
96 enum event { erase_event, imbue_event, copyfmt_event };
97 typedef void (*event_callback)(event, ios_base&, int index);
98 void register_callback(event_callback fn, int index);
99
100 ios_base(const ios_base&) = delete;
101 ios_base& operator=(const ios_base&) = delete;
102
103 static bool sync_with_stdio(bool sync = true);
104
105protected:
106 ios_base();
107};
108
109template <class charT, class traits = char_traits<charT> >
110class basic_ios
111 : public ios_base
112{
113public:
114 // types:
115 typedef charT char_type;
Marshall Clow57dbb062015-10-29 05:43:30 +0000116 typedef typename traits::int_type int_type; // removed in C++17
117 typedef typename traits::pos_type pos_type; // removed in C++17
118 typedef typename traits::off_type off_type; // removed in C++17
Howard Hinnantc51e1022010-05-11 19:42:16 +0000119 typedef traits traits_type;
120
121 operator unspecified-bool-type() const;
122 bool operator!() const;
123 iostate rdstate() const;
124 void clear(iostate state = goodbit);
125 void setstate(iostate state);
126 bool good() const;
127 bool eof() const;
128 bool fail() const;
129 bool bad() const;
130
131 iostate exceptions() const;
132 void exceptions(iostate except);
133
134 // 27.5.4.1 Constructor/destructor:
135 explicit basic_ios(basic_streambuf<charT,traits>* sb);
136 virtual ~basic_ios();
137
138 // 27.5.4.2 Members:
139 basic_ostream<charT,traits>* tie() const;
140 basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr);
141
142 basic_streambuf<charT,traits>* rdbuf() const;
143 basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb);
144
145 basic_ios& copyfmt(const basic_ios& rhs);
146
147 char_type fill() const;
148 char_type fill(char_type ch);
149
150 locale imbue(const locale& loc);
151
152 char narrow(char_type c, char dfault) const;
153 char_type widen(char c) const;
154
155 basic_ios(const basic_ios& ) = delete;
156 basic_ios& operator=(const basic_ios&) = delete;
157
158protected:
159 basic_ios();
160 void init(basic_streambuf<charT,traits>* sb);
161 void move(basic_ios& rhs);
Howard Hinnant770a3662012-07-21 01:03:40 +0000162 void swap(basic_ios& rhs) noexcept;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000163 void set_rdbuf(basic_streambuf<charT, traits>* sb);
164};
165
166// 27.5.5, manipulators:
167ios_base& boolalpha (ios_base& str);
168ios_base& noboolalpha(ios_base& str);
169ios_base& showbase (ios_base& str);
170ios_base& noshowbase (ios_base& str);
171ios_base& showpoint (ios_base& str);
172ios_base& noshowpoint(ios_base& str);
173ios_base& showpos (ios_base& str);
174ios_base& noshowpos (ios_base& str);
175ios_base& skipws (ios_base& str);
176ios_base& noskipws (ios_base& str);
177ios_base& uppercase (ios_base& str);
178ios_base& nouppercase(ios_base& str);
179ios_base& unitbuf (ios_base& str);
180ios_base& nounitbuf (ios_base& str);
181
182// 27.5.5.2 adjustfield:
183ios_base& internal (ios_base& str);
184ios_base& left (ios_base& str);
185ios_base& right (ios_base& str);
186
187// 27.5.5.3 basefield:
188ios_base& dec (ios_base& str);
189ios_base& hex (ios_base& str);
190ios_base& oct (ios_base& str);
191
192// 27.5.5.4 floatfield:
193ios_base& fixed (ios_base& str);
194ios_base& scientific (ios_base& str);
195ios_base& hexfloat (ios_base& str);
196ios_base& defaultfloat(ios_base& str);
197
198// 27.5.5.5 error reporting:
199enum class io_errc
200{
201 stream = 1
202};
203
204concept_map ErrorCodeEnum<io_errc> { };
Louis Dionne173f29e2019-05-29 16:01:36 +0000205error_code make_error_code(io_errc e) noexcept;
206error_condition make_error_condition(io_errc e) noexcept;
Marshall Clow3f138dc2013-10-12 22:49:56 +0000207storage-class-specifier const error_category& iostream_category() noexcept;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000208
209} // std
210
211*/
212
213#include <__config>
Louis Dionne685c4702022-05-18 13:17:14 -0400214
215#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
216# error "The iostreams library is not supported since libc++ has been configured without support for localization."
217#endif
218
219#include <__assert> // all public C++ headers provide the assertion handler
Nikolas Klauser80840272022-02-04 13:04:33 +0100220#include <__ios/fpos.h>
Howard Hinnantc51e1022010-05-11 19:42:16 +0000221#include <__locale>
Nikolas Klauser8fccd622022-03-05 19:17:07 +0100222#include <__utility/swap.h>
Howard Hinnantc51e1022010-05-11 19:42:16 +0000223#include <system_error>
Mark de Weverce8f12c2021-12-22 18:14:14 +0100224#include <version>
Howard Hinnantc51e1022010-05-11 19:42:16 +0000225
Nikolas Klausera0e0edb2022-06-16 22:43:46 +0200226// standard-mandated includes
Nikolas Klauser71619e72022-09-22 18:05:08 +0200227
228// [ios.syn]
Nikolas Klausera0e0edb2022-06-16 22:43:46 +0200229#include <iosfwd>
230
Eric Fiselier8020b6c2015-08-19 17:21:46 +0000231#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
Marshall Clowf9698ab2013-10-12 19:13:52 +0000232#include <atomic> // for __xindex_
233#endif
234
Howard Hinnantaaaa52b2011-10-17 20:05:10 +0000235#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Arthur O'Dwyer6eeaa002022-02-01 20:16:40 -0500236# pragma GCC system_header
Howard Hinnantaaaa52b2011-10-17 20:05:10 +0000237#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +0000238
239_LIBCPP_BEGIN_NAMESPACE_STD
240
241typedef ptrdiff_t streamsize;
242
Howard Hinnant8331b762013-03-06 23:30:19 +0000243class _LIBCPP_TYPE_VIS ios_base
Howard Hinnantc51e1022010-05-11 19:42:16 +0000244{
245public:
Eric Fiselierfb7fc952016-04-21 23:00:33 +0000246 class _LIBCPP_EXCEPTION_ABI failure;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000247
248 typedef unsigned int fmtflags;
249 static const fmtflags boolalpha = 0x0001;
250 static const fmtflags dec = 0x0002;
251 static const fmtflags fixed = 0x0004;
252 static const fmtflags hex = 0x0008;
253 static const fmtflags internal = 0x0010;
254 static const fmtflags left = 0x0020;
255 static const fmtflags oct = 0x0040;
256 static const fmtflags right = 0x0080;
257 static const fmtflags scientific = 0x0100;
258 static const fmtflags showbase = 0x0200;
259 static const fmtflags showpoint = 0x0400;
260 static const fmtflags showpos = 0x0800;
261 static const fmtflags skipws = 0x1000;
262 static const fmtflags unitbuf = 0x2000;
263 static const fmtflags uppercase = 0x4000;
264 static const fmtflags adjustfield = left | right | internal;
265 static const fmtflags basefield = dec | oct | hex;
266 static const fmtflags floatfield = scientific | fixed;
267
268 typedef unsigned int iostate;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000269 static const iostate badbit = 0x1;
270 static const iostate eofbit = 0x2;
271 static const iostate failbit = 0x4;
272 static const iostate goodbit = 0x0;
273
274 typedef unsigned int openmode;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000275 static const openmode app = 0x01;
276 static const openmode ate = 0x02;
277 static const openmode binary = 0x04;
278 static const openmode in = 0x08;
279 static const openmode out = 0x10;
280 static const openmode trunc = 0x20;
281
282 enum seekdir {beg, cur, end};
Marshall Clow57dbb062015-10-29 05:43:30 +0000283
284#if _LIBCPP_STD_VER <= 14
285 typedef iostate io_state;
286 typedef openmode open_mode;
287 typedef seekdir seek_dir;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000288
Howard Hinnantb1ad5a82011-06-30 21:18:19 +0000289 typedef _VSTD::streamoff streamoff;
290 typedef _VSTD::streampos streampos;
Marshall Clow57dbb062015-10-29 05:43:30 +0000291#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +0000292
Howard Hinnant8331b762013-03-06 23:30:19 +0000293 class _LIBCPP_TYPE_VIS Init;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000294
295 // 27.5.2.2 fmtflags state:
Howard Hinnantcf823322010-12-17 14:46:43 +0000296 _LIBCPP_INLINE_VISIBILITY fmtflags flags() const;
297 _LIBCPP_INLINE_VISIBILITY fmtflags flags(fmtflags __fmtfl);
298 _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl);
299 _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl, fmtflags __mask);
300 _LIBCPP_INLINE_VISIBILITY void unsetf(fmtflags __mask);
Howard Hinnantc51e1022010-05-11 19:42:16 +0000301
Howard Hinnantcf823322010-12-17 14:46:43 +0000302 _LIBCPP_INLINE_VISIBILITY streamsize precision() const;
303 _LIBCPP_INLINE_VISIBILITY streamsize precision(streamsize __prec);
304 _LIBCPP_INLINE_VISIBILITY streamsize width() const;
305 _LIBCPP_INLINE_VISIBILITY streamsize width(streamsize __wide);
Howard Hinnantc51e1022010-05-11 19:42:16 +0000306
307 // 27.5.2.3 locales:
308 locale imbue(const locale& __loc);
309 locale getloc() const;
310
311 // 27.5.2.5 storage:
312 static int xalloc();
313 long& iword(int __index);
314 void*& pword(int __index);
315
316 // destructor
317 virtual ~ios_base();
318
319 // 27.5.2.6 callbacks;
320 enum event { erase_event, imbue_event, copyfmt_event };
321 typedef void (*event_callback)(event, ios_base&, int __index);
322 void register_callback(event_callback __fn, int __index);
323
Nikolas Klauser07088642021-12-08 10:57:12 +0100324 ios_base(const ios_base&) = delete;
325 ios_base& operator=(const ios_base&) = delete;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000326
Howard Hinnantc51e1022010-05-11 19:42:16 +0000327 static bool sync_with_stdio(bool __sync = true);
328
Howard Hinnantcf823322010-12-17 14:46:43 +0000329 _LIBCPP_INLINE_VISIBILITY iostate rdstate() const;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000330 void clear(iostate __state = goodbit);
Howard Hinnantcf823322010-12-17 14:46:43 +0000331 _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state);
Howard Hinnantc51e1022010-05-11 19:42:16 +0000332
Howard Hinnantcf823322010-12-17 14:46:43 +0000333 _LIBCPP_INLINE_VISIBILITY bool good() const;
334 _LIBCPP_INLINE_VISIBILITY bool eof() const;
335 _LIBCPP_INLINE_VISIBILITY bool fail() const;
336 _LIBCPP_INLINE_VISIBILITY bool bad() const;
Howard Hinnant3b6579a2010-08-22 00:02:43 +0000337
Howard Hinnantcf823322010-12-17 14:46:43 +0000338 _LIBCPP_INLINE_VISIBILITY iostate exceptions() const;
Howard Hinnantf8850802013-10-06 21:00:29 +0000339 _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate);
Howard Hinnantc51e1022010-05-11 19:42:16 +0000340
341 void __set_badbit_and_consider_rethrow();
342 void __set_failbit_and_consider_rethrow();
343
Louis Dionne94ee3a02019-04-05 16:33:37 +0000344 _LIBCPP_INLINE_VISIBILITY
345 void __setstate_nothrow(iostate __state)
346 {
347 if (__rdbuf_)
348 __rdstate_ |= __state;
349 else
350 __rdstate_ |= __state | ios_base::badbit;
351 }
352
Howard Hinnantc51e1022010-05-11 19:42:16 +0000353protected:
Howard Hinnant64da2602010-09-22 15:29:08 +0000354 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000355 ios_base() {// purposefully does no initialization
356 }
357
358 void init(void* __sb);
Louis Dionne16fe2952018-07-11 23:14:33 +0000359 _LIBCPP_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}
Howard Hinnantc51e1022010-05-11 19:42:16 +0000360
Louis Dionne16fe2952018-07-11 23:14:33 +0000361 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000362 void rdbuf(void* __sb)
363 {
364 __rdbuf_ = __sb;
365 clear();
366 }
367
368 void __call_callbacks(event);
369 void copyfmt(const ios_base&);
370 void move(ios_base&);
Howard Hinnant770a3662012-07-21 01:03:40 +0000371 void swap(ios_base&) _NOEXCEPT;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000372
Louis Dionne16fe2952018-07-11 23:14:33 +0000373 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000374 void set_rdbuf(void* __sb)
375 {
376 __rdbuf_ = __sb;
377 }
378
379private:
380 // All data members must be scalars
381 fmtflags __fmtflags_;
382 streamsize __precision_;
383 streamsize __width_;
384 iostate __rdstate_;
385 iostate __exceptions_;
386 void* __rdbuf_;
387 void* __loc_;
388 event_callback* __fn_;
389 int* __index_;
390 size_t __event_size_;
391 size_t __event_cap_;
Eric Fiselier8020b6c2015-08-19 17:21:46 +0000392// TODO(EricWF): Enable this for both Clang and GCC. Currently it is only
393// enabled with clang.
394#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS)
Marshall Clowf9698ab2013-10-12 19:13:52 +0000395 static atomic<int> __xindex_;
396#else
Howard Hinnantc51e1022010-05-11 19:42:16 +0000397 static int __xindex_;
Marshall Clowf9698ab2013-10-12 19:13:52 +0000398#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +0000399 long* __iarray_;
400 size_t __iarray_size_;
401 size_t __iarray_cap_;
402 void** __parray_;
403 size_t __parray_size_;
404 size_t __parray_cap_;
405};
406
407//enum class io_errc
Howard Hinnant09bc0c92011-12-02 19:36:40 +0000408_LIBCPP_DECLARE_STRONG_ENUM(io_errc)
Howard Hinnantc51e1022010-05-11 19:42:16 +0000409{
Howard Hinnantc51e1022010-05-11 19:42:16 +0000410 stream = 1
411};
Howard Hinnant09bc0c92011-12-02 19:36:40 +0000412_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
Howard Hinnantc51e1022010-05-11 19:42:16 +0000413
Howard Hinnant64da2602010-09-22 15:29:08 +0000414template <>
Eric Fiselierb5eb1bf2017-01-04 23:56:00 +0000415struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };
Howard Hinnant09bc0c92011-12-02 19:36:40 +0000416
Mark de Wever337f8932022-02-11 19:34:33 +0100417#ifdef _LIBCPP_CXX03_LANG
Howard Hinnant64da2602010-09-22 15:29:08 +0000418template <>
Eric Fiselierb5eb1bf2017-01-04 23:56:00 +0000419struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
Howard Hinnant09bc0c92011-12-02 19:36:40 +0000420#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +0000421
Howard Hinnant8331b762013-03-06 23:30:19 +0000422_LIBCPP_FUNC_VIS
Marshall Clow3f138dc2013-10-12 22:49:56 +0000423const error_category& iostream_category() _NOEXCEPT;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000424
425inline _LIBCPP_INLINE_VISIBILITY
426error_code
Marshall Clow3f138dc2013-10-12 22:49:56 +0000427make_error_code(io_errc __e) _NOEXCEPT
Howard Hinnantc51e1022010-05-11 19:42:16 +0000428{
429 return error_code(static_cast<int>(__e), iostream_category());
430}
431
432inline _LIBCPP_INLINE_VISIBILITY
433error_condition
Marshall Clow3f138dc2013-10-12 22:49:56 +0000434make_error_condition(io_errc __e) _NOEXCEPT
Howard Hinnantc51e1022010-05-11 19:42:16 +0000435{
436 return error_condition(static_cast<int>(__e), iostream_category());
437}
438
Howard Hinnant64da2602010-09-22 15:29:08 +0000439class _LIBCPP_EXCEPTION_ABI ios_base::failure
Howard Hinnantc51e1022010-05-11 19:42:16 +0000440 : public system_error
Howard Hinnant3b6579a2010-08-22 00:02:43 +0000441{
442public:
Howard Hinnantc51e1022010-05-11 19:42:16 +0000443 explicit failure(const string& __msg, const error_code& __ec = io_errc::stream);
Howard Hinnant3b6579a2010-08-22 00:02:43 +0000444 explicit failure(const char* __msg, const error_code& __ec = io_errc::stream);
Dimitry Andric47269ce2020-03-13 19:36:26 +0100445 failure(const failure&) _NOEXCEPT = default;
Nikolas Klauseraa3a6cd2022-08-24 02:14:29 +0200446 ~failure() _NOEXCEPT override;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000447};
448
Louis Dionne2b239162019-02-12 16:06:02 +0000449_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
450void __throw_failure(char const* __msg) {
451#ifndef _LIBCPP_NO_EXCEPTIONS
452 throw ios_base::failure(__msg);
453#else
454 ((void)__msg);
455 _VSTD::abort();
456#endif
457}
458
Howard Hinnant8331b762013-03-06 23:30:19 +0000459class _LIBCPP_TYPE_VIS ios_base::Init
Howard Hinnantc51e1022010-05-11 19:42:16 +0000460{
461public:
462 Init();
463 ~Init();
464};
465
466// fmtflags
467
468inline _LIBCPP_INLINE_VISIBILITY
469ios_base::fmtflags
470ios_base::flags() const
471{
472 return __fmtflags_;
473}
474
475inline _LIBCPP_INLINE_VISIBILITY
476ios_base::fmtflags
477ios_base::flags(fmtflags __fmtfl)
478{
479 fmtflags __r = __fmtflags_;
480 __fmtflags_ = __fmtfl;
481 return __r;
482}
483
484inline _LIBCPP_INLINE_VISIBILITY
485ios_base::fmtflags
486ios_base::setf(fmtflags __fmtfl)
487{
488 fmtflags __r = __fmtflags_;
489 __fmtflags_ |= __fmtfl;
490 return __r;
491}
492
493inline _LIBCPP_INLINE_VISIBILITY
494void
495ios_base::unsetf(fmtflags __mask)
496{
497 __fmtflags_ &= ~__mask;
498}
499
500inline _LIBCPP_INLINE_VISIBILITY
501ios_base::fmtflags
502ios_base::setf(fmtflags __fmtfl, fmtflags __mask)
503{
504 fmtflags __r = __fmtflags_;
505 unsetf(__mask);
506 __fmtflags_ |= __fmtfl & __mask;
507 return __r;
508}
509
510// precision
511
512inline _LIBCPP_INLINE_VISIBILITY
513streamsize
514ios_base::precision() const
515{
516 return __precision_;
517}
518
519inline _LIBCPP_INLINE_VISIBILITY
520streamsize
521ios_base::precision(streamsize __prec)
522{
523 streamsize __r = __precision_;
524 __precision_ = __prec;
525 return __r;
526}
527
528// width
529
530inline _LIBCPP_INLINE_VISIBILITY
531streamsize
532ios_base::width() const
533{
534 return __width_;
535}
536
537inline _LIBCPP_INLINE_VISIBILITY
538streamsize
539ios_base::width(streamsize __wide)
540{
541 streamsize __r = __width_;
542 __width_ = __wide;
543 return __r;
544}
545
546// iostate
547
548inline _LIBCPP_INLINE_VISIBILITY
549ios_base::iostate
550ios_base::rdstate() const
551{
552 return __rdstate_;
553}
554
555inline _LIBCPP_INLINE_VISIBILITY
556void
557ios_base::setstate(iostate __state)
558{
559 clear(__rdstate_ | __state);
560}
561
562inline _LIBCPP_INLINE_VISIBILITY
563bool
564ios_base::good() const
565{
566 return __rdstate_ == 0;
567}
568
569inline _LIBCPP_INLINE_VISIBILITY
570bool
571ios_base::eof() const
572{
Marshall Clow11de4872013-10-21 14:41:05 +0000573 return (__rdstate_ & eofbit) != 0;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000574}
575
576inline _LIBCPP_INLINE_VISIBILITY
577bool
578ios_base::fail() const
579{
Marshall Clow11de4872013-10-21 14:41:05 +0000580 return (__rdstate_ & (failbit | badbit)) != 0;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000581}
582
583inline _LIBCPP_INLINE_VISIBILITY
584bool
585ios_base::bad() const
586{
Marshall Clow11de4872013-10-21 14:41:05 +0000587 return (__rdstate_ & badbit) != 0;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000588}
589
590inline _LIBCPP_INLINE_VISIBILITY
591ios_base::iostate
592ios_base::exceptions() const
593{
594 return __exceptions_;
595}
596
597inline _LIBCPP_INLINE_VISIBILITY
598void
Howard Hinnantf8850802013-10-06 21:00:29 +0000599ios_base::exceptions(iostate __iostate)
Howard Hinnantc51e1022010-05-11 19:42:16 +0000600{
Howard Hinnantf8850802013-10-06 21:00:29 +0000601 __exceptions_ = __iostate;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000602 clear(__rdstate_);
603}
604
605template <class _CharT, class _Traits>
Eric Fiselierb5eb1bf2017-01-04 23:56:00 +0000606class _LIBCPP_TEMPLATE_VIS basic_ios
Howard Hinnantc51e1022010-05-11 19:42:16 +0000607 : public ios_base
608{
609public:
610 // types:
611 typedef _CharT char_type;
612 typedef _Traits traits_type;
613
614 typedef typename traits_type::int_type int_type;
615 typedef typename traits_type::pos_type pos_type;
616 typedef typename traits_type::off_type off_type;
617
Marshall Clowd151d182018-02-01 03:55:27 +0000618 static_assert((is_same<_CharT, typename traits_type::char_type>::value),
619 "traits_type::char_type must be the same type as CharT");
620
Arthur O'Dwyerde7f7b42021-08-06 14:50:09 -0400621#ifdef _LIBCPP_CXX03_LANG
622 // Preserve the ability to compare with literal 0,
623 // and implicitly convert to bool, but not implicitly convert to int.
624 _LIBCPP_INLINE_VISIBILITY
625 operator void*() const {return fail() ? nullptr : (void*)this;}
626#else
Louis Dionne16fe2952018-07-11 23:14:33 +0000627 _LIBCPP_INLINE_VISIBILITY
Arthur O'Dwyer6c9c9a72021-06-15 12:57:54 -0400628 explicit operator bool() const {return !fail();}
Arthur O'Dwyerde7f7b42021-08-06 14:50:09 -0400629#endif
Eric Fiselier6a5f6f92016-12-30 14:05:52 +0000630
Louis Dionne16fe2952018-07-11 23:14:33 +0000631 _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();}
632 _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();}
633 _LIBCPP_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
634 _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
635 _LIBCPP_INLINE_VISIBILITY bool good() const {return ios_base::good();}
636 _LIBCPP_INLINE_VISIBILITY bool eof() const {return ios_base::eof();}
637 _LIBCPP_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
638 _LIBCPP_INLINE_VISIBILITY bool bad() const {return ios_base::bad();}
Howard Hinnantc51e1022010-05-11 19:42:16 +0000639
Louis Dionne16fe2952018-07-11 23:14:33 +0000640 _LIBCPP_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
641 _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
Howard Hinnantc51e1022010-05-11 19:42:16 +0000642
643 // 27.5.4.1 Constructor/destructor:
Howard Hinnantcf823322010-12-17 14:46:43 +0000644 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000645 explicit basic_ios(basic_streambuf<char_type,traits_type>* __sb);
Nikolas Klauseraa3a6cd2022-08-24 02:14:29 +0200646 ~basic_ios() override;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000647
648 // 27.5.4.2 Members:
Louis Dionne173f29e2019-05-29 16:01:36 +0000649 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000650 basic_ostream<char_type, traits_type>* tie() const;
Louis Dionne173f29e2019-05-29 16:01:36 +0000651 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000652 basic_ostream<char_type, traits_type>* tie(basic_ostream<char_type, traits_type>* __tiestr);
653
Louis Dionne173f29e2019-05-29 16:01:36 +0000654 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000655 basic_streambuf<char_type, traits_type>* rdbuf() const;
Louis Dionne173f29e2019-05-29 16:01:36 +0000656 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000657 basic_streambuf<char_type, traits_type>* rdbuf(basic_streambuf<char_type, traits_type>* __sb);
658
659 basic_ios& copyfmt(const basic_ios& __rhs);
660
Louis Dionne173f29e2019-05-29 16:01:36 +0000661 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000662 char_type fill() const;
Louis Dionne173f29e2019-05-29 16:01:36 +0000663 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000664 char_type fill(char_type __ch);
665
Louis Dionne173f29e2019-05-29 16:01:36 +0000666 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000667 locale imbue(const locale& __loc);
668
Louis Dionne173f29e2019-05-29 16:01:36 +0000669 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000670 char narrow(char_type __c, char __dfault) const;
Louis Dionne173f29e2019-05-29 16:01:36 +0000671 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000672 char_type widen(char __c) const;
673
674protected:
Louis Dionne16fe2952018-07-11 23:14:33 +0000675 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000676 basic_ios() {// purposefully does no initialization
677 }
Louis Dionne173f29e2019-05-29 16:01:36 +0000678 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000679 void init(basic_streambuf<char_type, traits_type>* __sb);
680
Louis Dionne173f29e2019-05-29 16:01:36 +0000681 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000682 void move(basic_ios& __rhs);
Louis Dionne16fe2952018-07-11 23:14:33 +0000683 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000684 void move(basic_ios&& __rhs) {move(__rhs);}
Louis Dionne173f29e2019-05-29 16:01:36 +0000685 _LIBCPP_INLINE_VISIBILITY
Howard Hinnant770a3662012-07-21 01:03:40 +0000686 void swap(basic_ios& __rhs) _NOEXCEPT;
Louis Dionne173f29e2019-05-29 16:01:36 +0000687 _LIBCPP_INLINE_VISIBILITY
Howard Hinnantc51e1022010-05-11 19:42:16 +0000688 void set_rdbuf(basic_streambuf<char_type, traits_type>* __sb);
689private:
690 basic_ostream<char_type, traits_type>* __tie_;
Bruce Mitchenerca134c52018-02-14 00:29:38 +0000691 mutable int_type __fill_;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000692};
693
694template <class _CharT, class _Traits>
695inline _LIBCPP_INLINE_VISIBILITY
696basic_ios<_CharT, _Traits>::basic_ios(basic_streambuf<char_type,traits_type>* __sb)
697{
698 init(__sb);
699}
700
701template <class _CharT, class _Traits>
702basic_ios<_CharT, _Traits>::~basic_ios()
703{
704}
705
706template <class _CharT, class _Traits>
707inline _LIBCPP_INLINE_VISIBILITY
708void
709basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb)
710{
711 ios_base::init(__sb);
Bruce Mitchener170d8972020-11-24 12:53:53 -0500712 __tie_ = nullptr;
Howard Hinnant2efe10d2012-08-26 18:05:35 +0000713 __fill_ = traits_type::eof();
Howard Hinnantc51e1022010-05-11 19:42:16 +0000714}
715
716template <class _CharT, class _Traits>
717inline _LIBCPP_INLINE_VISIBILITY
718basic_ostream<_CharT, _Traits>*
719basic_ios<_CharT, _Traits>::tie() const
720{
721 return __tie_;
722}
723
724template <class _CharT, class _Traits>
725inline _LIBCPP_INLINE_VISIBILITY
726basic_ostream<_CharT, _Traits>*
727basic_ios<_CharT, _Traits>::tie(basic_ostream<char_type, traits_type>* __tiestr)
728{
729 basic_ostream<char_type, traits_type>* __r = __tie_;
730 __tie_ = __tiestr;
731 return __r;
732}
733
734template <class _CharT, class _Traits>
735inline _LIBCPP_INLINE_VISIBILITY
736basic_streambuf<_CharT, _Traits>*
737basic_ios<_CharT, _Traits>::rdbuf() const
738{
739 return static_cast<basic_streambuf<char_type, traits_type>*>(ios_base::rdbuf());
740}
741
742template <class _CharT, class _Traits>
743inline _LIBCPP_INLINE_VISIBILITY
744basic_streambuf<_CharT, _Traits>*
745basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<char_type, traits_type>* __sb)
746{
747 basic_streambuf<char_type, traits_type>* __r = rdbuf();
748 ios_base::rdbuf(__sb);
749 return __r;
750}
751
752template <class _CharT, class _Traits>
753inline _LIBCPP_INLINE_VISIBILITY
754locale
755basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
756{
757 locale __r = getloc();
758 ios_base::imbue(__loc);
759 if (rdbuf())
760 rdbuf()->pubimbue(__loc);
761 return __r;
762}
763
764template <class _CharT, class _Traits>
765inline _LIBCPP_INLINE_VISIBILITY
766char
767basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
768{
769 return use_facet<ctype<char_type> >(getloc()).narrow(__c, __dfault);
770}
771
772template <class _CharT, class _Traits>
773inline _LIBCPP_INLINE_VISIBILITY
774_CharT
775basic_ios<_CharT, _Traits>::widen(char __c) const
776{
777 return use_facet<ctype<char_type> >(getloc()).widen(__c);
778}
779
780template <class _CharT, class _Traits>
781inline _LIBCPP_INLINE_VISIBILITY
782_CharT
783basic_ios<_CharT, _Traits>::fill() const
784{
Howard Hinnant2efe10d2012-08-26 18:05:35 +0000785 if (traits_type::eq_int_type(traits_type::eof(), __fill_))
786 __fill_ = widen(' ');
Howard Hinnantc51e1022010-05-11 19:42:16 +0000787 return __fill_;
788}
789
790template <class _CharT, class _Traits>
791inline _LIBCPP_INLINE_VISIBILITY
792_CharT
793basic_ios<_CharT, _Traits>::fill(char_type __ch)
794{
Jake Egana7505342022-03-03 09:28:23 -0500795 if (traits_type::eq_int_type(traits_type::eof(), __fill_))
796 __fill_ = widen(' ');
Howard Hinnantc51e1022010-05-11 19:42:16 +0000797 char_type __r = __fill_;
798 __fill_ = __ch;
799 return __r;
800}
801
802template <class _CharT, class _Traits>
803basic_ios<_CharT, _Traits>&
804basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
805{
806 if (this != &__rhs)
807 {
808 __call_callbacks(erase_event);
809 ios_base::copyfmt(__rhs);
810 __tie_ = __rhs.__tie_;
811 __fill_ = __rhs.__fill_;
812 __call_callbacks(copyfmt_event);
813 exceptions(__rhs.exceptions());
814 }
815 return *this;
816}
817
818template <class _CharT, class _Traits>
819inline _LIBCPP_INLINE_VISIBILITY
820void
821basic_ios<_CharT, _Traits>::move(basic_ios& __rhs)
822{
823 ios_base::move(__rhs);
824 __tie_ = __rhs.__tie_;
Bruce Mitchener170d8972020-11-24 12:53:53 -0500825 __rhs.__tie_ = nullptr;
Howard Hinnantc51e1022010-05-11 19:42:16 +0000826 __fill_ = __rhs.__fill_;
827}
828
829template <class _CharT, class _Traits>
830inline _LIBCPP_INLINE_VISIBILITY
831void
Howard Hinnant770a3662012-07-21 01:03:40 +0000832basic_ios<_CharT, _Traits>::swap(basic_ios& __rhs) _NOEXCEPT
Howard Hinnantc51e1022010-05-11 19:42:16 +0000833{
834 ios_base::swap(__rhs);
Howard Hinnantb1ad5a82011-06-30 21:18:19 +0000835 _VSTD::swap(__tie_, __rhs.__tie_);
836 _VSTD::swap(__fill_, __rhs.__fill_);
Howard Hinnantc51e1022010-05-11 19:42:16 +0000837}
838
839template <class _CharT, class _Traits>
840inline _LIBCPP_INLINE_VISIBILITY
841void
842basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* __sb)
843{
844 ios_base::set_rdbuf(__sb);
845}
846
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200847_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000848ios_base&
849boolalpha(ios_base& __str)
850{
851 __str.setf(ios_base::boolalpha);
852 return __str;
853}
854
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200855_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000856ios_base&
857noboolalpha(ios_base& __str)
858{
859 __str.unsetf(ios_base::boolalpha);
860 return __str;
861}
862
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200863_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000864ios_base&
865showbase(ios_base& __str)
866{
867 __str.setf(ios_base::showbase);
868 return __str;
869}
870
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200871_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000872ios_base&
873noshowbase(ios_base& __str)
874{
875 __str.unsetf(ios_base::showbase);
876 return __str;
877}
878
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200879_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000880ios_base&
881showpoint(ios_base& __str)
882{
883 __str.setf(ios_base::showpoint);
884 return __str;
885}
886
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200887_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000888ios_base&
889noshowpoint(ios_base& __str)
890{
891 __str.unsetf(ios_base::showpoint);
892 return __str;
893}
894
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200895_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000896ios_base&
897showpos(ios_base& __str)
898{
899 __str.setf(ios_base::showpos);
900 return __str;
901}
902
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200903_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000904ios_base&
905noshowpos(ios_base& __str)
906{
907 __str.unsetf(ios_base::showpos);
908 return __str;
909}
910
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200911_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000912ios_base&
913skipws(ios_base& __str)
914{
915 __str.setf(ios_base::skipws);
916 return __str;
917}
918
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200919_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000920ios_base&
921noskipws(ios_base& __str)
922{
923 __str.unsetf(ios_base::skipws);
924 return __str;
925}
926
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200927_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000928ios_base&
929uppercase(ios_base& __str)
930{
931 __str.setf(ios_base::uppercase);
932 return __str;
933}
934
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200935_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000936ios_base&
937nouppercase(ios_base& __str)
938{
939 __str.unsetf(ios_base::uppercase);
940 return __str;
941}
942
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200943_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000944ios_base&
945unitbuf(ios_base& __str)
946{
947 __str.setf(ios_base::unitbuf);
948 return __str;
949}
950
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200951_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000952ios_base&
953nounitbuf(ios_base& __str)
954{
955 __str.unsetf(ios_base::unitbuf);
956 return __str;
957}
958
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200959_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000960ios_base&
961internal(ios_base& __str)
962{
963 __str.setf(ios_base::internal, ios_base::adjustfield);
964 return __str;
965}
966
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200967_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000968ios_base&
969left(ios_base& __str)
970{
971 __str.setf(ios_base::left, ios_base::adjustfield);
972 return __str;
973}
974
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200975_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000976ios_base&
977right(ios_base& __str)
978{
979 __str.setf(ios_base::right, ios_base::adjustfield);
980 return __str;
981}
982
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200983_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000984ios_base&
985dec(ios_base& __str)
986{
987 __str.setf(ios_base::dec, ios_base::basefield);
988 return __str;
989}
990
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200991_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +0000992ios_base&
993hex(ios_base& __str)
994{
995 __str.setf(ios_base::hex, ios_base::basefield);
996 return __str;
997}
998
Nikolas Klausera9ad6702022-08-13 13:23:16 +0200999_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +00001000ios_base&
1001oct(ios_base& __str)
1002{
1003 __str.setf(ios_base::oct, ios_base::basefield);
1004 return __str;
1005}
1006
Nikolas Klausera9ad6702022-08-13 13:23:16 +02001007_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +00001008ios_base&
1009fixed(ios_base& __str)
1010{
1011 __str.setf(ios_base::fixed, ios_base::floatfield);
1012 return __str;
1013}
1014
Nikolas Klausera9ad6702022-08-13 13:23:16 +02001015_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +00001016ios_base&
1017scientific(ios_base& __str)
1018{
1019 __str.setf(ios_base::scientific, ios_base::floatfield);
1020 return __str;
1021}
1022
Nikolas Klausera9ad6702022-08-13 13:23:16 +02001023_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +00001024ios_base&
1025hexfloat(ios_base& __str)
1026{
1027 __str.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield);
1028 return __str;
1029}
1030
Nikolas Klausera9ad6702022-08-13 13:23:16 +02001031_LIBCPP_HIDE_FROM_ABI inline
Howard Hinnantc51e1022010-05-11 19:42:16 +00001032ios_base&
1033defaultfloat(ios_base& __str)
1034{
1035 __str.unsetf(ios_base::floatfield);
1036 return __str;
1037}
1038
Howard Hinnantc51e1022010-05-11 19:42:16 +00001039_LIBCPP_END_NAMESPACE_STD
1040
Louis Dionne2b1ceaa2021-04-20 12:03:32 -04001041#endif // _LIBCPP_IOS