37 #pragma GCC system_header
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
53 _S_boolalpha = 1L << 0,
57 _S_internal = 1L << 4,
61 _S_scientific = 1L << 8,
62 _S_showbase = 1L << 9,
63 _S_showpoint = 1L << 10,
64 _S_showpos = 1L << 11,
66 _S_unitbuf = 1L << 13,
67 _S_uppercase = 1L << 14,
68 _S_adjustfield = _S_left | _S_right | _S_internal,
69 _S_basefield = _S_dec | _S_oct | _S_hex,
70 _S_floatfield = _S_scientific | _S_fixed,
71 _S_ios_fmtflags_end = 1L << 16,
72 _S_ios_fmtflags_max = __INT_MAX__,
73 _S_ios_fmtflags_min = ~__INT_MAX__
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
89 operator~(_Ios_Fmtflags __a)
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,
114 _S_ios_openmode_max = __INT_MAX__,
115 _S_ios_openmode_min = ~__INT_MAX__
118 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
119 operator&(_Ios_Openmode __a, _Ios_Openmode __b)
120 {
return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
122 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
123 operator|(_Ios_Openmode __a, _Ios_Openmode __b)
124 {
return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
126 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
127 operator^(_Ios_Openmode __a, _Ios_Openmode __b)
128 {
return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
130 inline _GLIBCXX_CONSTEXPR _Ios_Openmode
131 operator~(_Ios_Openmode __a)
132 {
return _Ios_Openmode(~static_cast<int>(__a)); }
134 inline const _Ios_Openmode&
135 operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
136 {
return __a = __a | __b; }
138 inline const _Ios_Openmode&
139 operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
140 {
return __a = __a & __b; }
142 inline const _Ios_Openmode&
143 operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
144 {
return __a = __a ^ __b; }
152 _S_failbit = 1L << 2,
153 _S_ios_iostate_end = 1L << 16,
154 _S_ios_iostate_max = __INT_MAX__,
155 _S_ios_iostate_min = ~__INT_MAX__
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
167 operator^(_Ios_Iostate __a, _Ios_Iostate __b)
168 {
return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
170 inline _GLIBCXX_CONSTEXPR _Ios_Iostate
171 operator~(_Ios_Iostate __a)
172 {
return _Ios_Iostate(~static_cast<int>(__a)); }
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; }
182 inline const _Ios_Iostate&
183 operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
184 {
return __a = __a ^ __b; }
190 _S_cur = _GLIBCXX_STDIO_SEEK_CUR,
191 _S_end = _GLIBCXX_STDIO_SEEK_END,
192 _S_ios_seekdir_end = 1L << 16
215 class failure :
public exception
221 failure(
const string& __str)
throw();
229 what() const throw();
261 typedef _Ios_Fmtflags fmtflags;
264 static const fmtflags boolalpha = _S_boolalpha;
267 static const fmtflags dec = _S_dec;
270 static const fmtflags fixed = _S_fixed;
273 static const fmtflags hex = _S_hex;
278 static const fmtflags internal = _S_internal;
282 static const fmtflags left = _S_left;
285 static const fmtflags oct = _S_oct;
289 static const fmtflags right = _S_right;
292 static const fmtflags scientific = _S_scientific;
296 static const fmtflags showbase = _S_showbase;
300 static const fmtflags showpoint = _S_showpoint;
303 static const fmtflags showpos = _S_showpos;
306 static const fmtflags skipws = _S_skipws;
309 static const fmtflags unitbuf = _S_unitbuf;
313 static const fmtflags uppercase = _S_uppercase;
316 static const fmtflags adjustfield = _S_adjustfield;
319 static const fmtflags basefield = _S_basefield;
322 static const fmtflags floatfield = _S_floatfield;
336 typedef _Ios_Iostate iostate;
340 static const iostate badbit = _S_badbit;
343 static const iostate eofbit = _S_eofbit;
348 static const iostate failbit = _S_failbit;
351 static const iostate goodbit = _S_goodbit;
367 typedef _Ios_Openmode openmode;
370 static const openmode app = _S_app;
373 static const openmode ate = _S_ate;
378 static const openmode binary = _S_bin;
381 static const openmode in = _S_in;
384 static const openmode out = _S_out;
387 static const openmode trunc = _S_trunc;
399 typedef _Ios_Seekdir seekdir;
402 static const seekdir beg = _S_beg;
405 static const seekdir cur = _S_cur;
408 static const seekdir end = _S_end;
411 typedef
int io_state;
412 typedef
int open_mode;
413 typedef
int seek_dir;
415 typedef std::streampos streampos;
416 typedef std::streamoff streamoff;
442 typedef void (*event_callback) (
event __e, ios_base& __b,
int __i);
455 register_callback(event_callback __fn,
int __index);
458 streamsize _M_precision;
461 iostate _M_exception;
462 iostate _M_streambuf_state;
466 struct _Callback_list
469 _Callback_list* _M_next;
470 ios_base::event_callback _M_fn;
472 _Atomic_word _M_refcount;
474 _Callback_list(ios_base::event_callback __fn,
int __index,
475 _Callback_list* __cb)
476 : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
479 _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
483 _M_remove_reference()
486 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_refcount);
487 int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1);
490 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_refcount);
496 _Callback_list* _M_callbacks;
499 _M_call_callbacks(event __ev)
throw();
502 _M_dispose_callbacks(
void) throw();
509 _Words() : _M_pword(0), _M_iword(0) { }
517 enum { _S_local_word_size = 8 };
518 _Words _M_local_word[_S_local_word_size];
525 _M_grow_words(
int __index,
bool __iword);
528 locale _M_ios_locale;
541 friend class ios_base;
547 static _Atomic_word _S_refcount;
548 static bool _S_synced_with_stdio;
568 flags(fmtflags __fmtfl)
570 fmtflags __old = _M_flags;
584 setf(fmtflags __fmtfl)
586 fmtflags __old = _M_flags;
601 setf(fmtflags __fmtfl, fmtflags __mask)
603 fmtflags __old = _M_flags;
605 _M_flags |= (__fmtfl & __mask);
616 unsetf(fmtflags __mask)
617 { _M_flags &= ~__mask; }
628 {
return _M_precision; }
636 precision(streamsize __prec)
638 streamsize __old = _M_precision;
639 _M_precision = __prec;
659 width(streamsize __wide)
661 streamsize __old = _M_width;
678 sync_with_stdio(
bool __sync =
true);
690 imbue(
const locale& __loc)
throw();
702 {
return _M_ios_locale; }
713 {
return _M_ios_locale; }
749 _Words& __word = (__ix < _M_word_size)
750 ? _M_word[__ix] : _M_grow_words(__ix,
true);
751 return __word._M_iword;
770 _Words& __word = (__ix < _M_word_size)
771 ? _M_word[__ix] : _M_grow_words(__ix,
false);
772 return __word._M_pword;
792 ios_base(const ios_base&);
795 operator=(const ios_base&);
801 boolalpha(ios_base&
__base)
803 __base.setf(ios_base::boolalpha);
809 noboolalpha(ios_base& __base)
811 __base.unsetf(ios_base::boolalpha);
817 showbase(ios_base& __base)
819 __base.setf(ios_base::showbase);
825 noshowbase(ios_base& __base)
827 __base.unsetf(ios_base::showbase);
833 showpoint(ios_base& __base)
835 __base.setf(ios_base::showpoint);
841 noshowpoint(ios_base& __base)
843 __base.unsetf(ios_base::showpoint);
849 showpos(ios_base& __base)
851 __base.setf(ios_base::showpos);
857 noshowpos(ios_base& __base)
859 __base.unsetf(ios_base::showpos);
865 skipws(ios_base& __base)
867 __base.setf(ios_base::skipws);
873 noskipws(ios_base& __base)
875 __base.unsetf(ios_base::skipws);
881 uppercase(ios_base& __base)
883 __base.setf(ios_base::uppercase);
889 nouppercase(ios_base& __base)
891 __base.unsetf(ios_base::uppercase);
897 unitbuf(ios_base& __base)
899 __base.setf(ios_base::unitbuf);
905 nounitbuf(ios_base& __base)
907 __base.unsetf(ios_base::unitbuf);
914 internal(ios_base&
__base)
916 __base.setf(ios_base::internal, ios_base::adjustfield);
922 left(ios_base& __base)
924 __base.setf(ios_base::left, ios_base::adjustfield);
930 right(ios_base& __base)
932 __base.setf(ios_base::right, ios_base::adjustfield);
939 dec(ios_base& __base)
941 __base.setf(ios_base::dec, ios_base::basefield);
947 hex(ios_base& __base)
949 __base.setf(ios_base::hex, ios_base::basefield);
955 oct(ios_base& __base)
957 __base.setf(ios_base::oct, ios_base::basefield);
964 fixed(ios_base& __base)
966 __base.setf(ios_base::fixed, ios_base::floatfield);
972 scientific(ios_base& __base)
974 __base.setf(ios_base::scientific, ios_base::floatfield);
978 _GLIBCXX_END_NAMESPACE_VERSION
_Siter_base< _Iterator >::iterator_type __base(_Iterator __it)
Definition: functions.h:446
namespace std _GLIBCXX_VISIBILITY(default)
Definition: auto_ptr.h:36