39 #pragma GCC system_header
45 namespace std _GLIBCXX_VISIBILITY(default)
47 _GLIBCXX_BEGIN_NAMESPACE_VERSION
55 _S_boolalpha = 1L << 0,
59 _S_internal = 1L << 4,
63 _S_scientific = 1L << 8,
64 _S_showbase = 1L << 9,
65 _S_showpoint = 1L << 10,
66 _S_showpos = 1L << 11,
68 _S_unitbuf = 1L << 13,
69 _S_uppercase = 1L << 14,
70 _S_adjustfield = _S_left | _S_right | _S_internal,
71 _S_basefield = _S_dec | _S_oct | _S_hex,
72 _S_floatfield = _S_scientific | _S_fixed,
73 _S_ios_fmtflags_end = 1L << 16
76 inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
77 operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
78 {
return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
80 inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
81 operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
82 {
return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
84 inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
85 operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
86 {
return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
88 inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
90 {
return _Ios_Fmtflags(~static_cast<int>(__a)); }
92 inline const _Ios_Fmtflags&
93 operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
94 {
return __a = __a | __b; }
96 inline const _Ios_Fmtflags&
97 operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
98 {
return __a = __a & __b; }
100 inline const _Ios_Fmtflags&
101 operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
102 {
return __a = __a ^ __b; }
113 _S_ios_openmode_end = 1L << 16
116 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
117 operator&(_Ios_Openmode __a, _Ios_Openmode __b)
118 {
return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
120 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
121 operator|(_Ios_Openmode __a, _Ios_Openmode __b)
122 {
return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
124 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
125 operator^(_Ios_Openmode __a, _Ios_Openmode __b)
126 {
return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
128 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
130 {
return _Ios_Openmode(~static_cast<int>(__a)); }
132 inline const _Ios_Openmode&
133 operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
134 {
return __a = __a | __b; }
136 inline const _Ios_Openmode&
137 operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
138 {
return __a = __a & __b; }
140 inline const _Ios_Openmode&
141 operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
142 {
return __a = __a ^ __b; }
150 _S_failbit = 1L << 2,
151 _S_ios_iostate_end = 1L << 16
154 inline _GLIBCXX_CONSTEXPR _Ios_Iostate
155 operator&(_Ios_Iostate __a, _Ios_Iostate __b)
156 {
return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
158 inline _GLIBCXX_CONSTEXPR _Ios_Iostate
159 operator|(_Ios_Iostate __a, _Ios_Iostate __b)
160 {
return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
162 inline _GLIBCXX_CONSTEXPR _Ios_Iostate
163 operator^(_Ios_Iostate __a, _Ios_Iostate __b)
164 {
return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
166 inline _GLIBCXX_CONSTEXPR _Ios_Iostate
168 {
return _Ios_Iostate(~static_cast<int>(__a)); }
170 inline const _Ios_Iostate&
171 operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
172 {
return __a = __a | __b; }
174 inline const _Ios_Iostate&
175 operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
176 {
return __a = __a & __b; }
178 inline const _Ios_Iostate&
179 operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
180 {
return __a = __a ^ __b; }
186 _S_cur = _GLIBCXX_STDIO_SEEK_CUR,
187 _S_end = _GLIBCXX_STDIO_SEEK_END,
188 _S_ios_seekdir_end = 1L << 16
217 failure(
const string& __str)
throw();
225 what()
const throw();
263 static const fmtflags
dec = _S_dec;
266 static const fmtflags
fixed = _S_fixed;
269 static const fmtflags
hex = _S_hex;
274 static const fmtflags
internal = _S_internal;
278 static const fmtflags
left = _S_left;
281 static const fmtflags
oct = _S_oct;
285 static const fmtflags
right = _S_right;
302 static const fmtflags
skipws = _S_skipws;
366 static const openmode
app = _S_app;
369 static const openmode
ate = _S_ate;
377 static const openmode
in = _S_in;
380 static const openmode
out = _S_out;
383 static const openmode
trunc = _S_trunc;
398 static const seekdir
beg = _S_beg;
401 static const seekdir
cur = _S_cur;
404 static const seekdir
end = _S_end;
407 typedef int io_state;
408 typedef int open_mode;
409 typedef int seek_dir;
457 iostate _M_exception;
458 iostate _M_streambuf_state;
462 struct _Callback_list
465 _Callback_list* _M_next;
468 _Atomic_word _M_refcount;
471 _Callback_list* __cb)
472 : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
475 _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
479 _M_remove_reference()
482 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_refcount);
483 int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1);
486 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_refcount);
492 _Callback_list* _M_callbacks;
495 _M_call_callbacks(
event __ev)
throw();
498 _M_dispose_callbacks(
void) throw();
505 _Words() : _M_pword(0), _M_iword(0) { }
513 enum { _S_local_word_size = 8 };
514 _Words _M_local_word[_S_local_word_size];
521 _M_grow_words(
int __index,
bool __iword);
524 locale _M_ios_locale;
537 friend class ios_base;
543 static _Atomic_word _S_refcount;
544 static bool _S_synced_with_stdio;
566 fmtflags __old = _M_flags;
582 fmtflags __old = _M_flags;
597 setf(fmtflags __fmtfl, fmtflags __mask)
599 fmtflags __old = _M_flags;
601 _M_flags |= (__fmtfl & __mask);
613 { _M_flags &= ~__mask; }
624 {
return _M_precision; }
635 _M_precision = __prec;
698 {
return _M_ios_locale; }
709 {
return _M_ios_locale; }
745 _Words& __word = (__ix < _M_word_size)
746 ? _M_word[__ix] : _M_grow_words(__ix,
true);
747 return __word._M_iword;
766 _Words& __word = (__ix < _M_word_size)
767 ? _M_word[__ix] : _M_grow_words(__ix,
false);
768 return __word._M_pword;
791 operator=(const ios_base&);
974 _GLIBCXX_END_NAMESPACE_VERSION