33#ifndef _GLIBCXX_IOMANIP
34#define _GLIBCXX_IOMANIP 1
37#pragma GCC system_header
40#pragma GCC diagnostic push
41#pragma GCC diagnostic ignored "-Wc++11-extensions"
49#define __glibcxx_want_quoted_string_io
52#if __cplusplus >= 201103L
54#if __cplusplus > 201103L
59namespace std _GLIBCXX_VISIBILITY(default)
61_GLIBCXX_BEGIN_NAMESPACE_VERSION
77 {
return { __mask }; }
79 template<
typename _CharT,
typename _Traits>
80 inline basic_istream<_CharT, _Traits>&
81 operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
87 template<
typename _CharT,
typename _Traits>
107 {
return { __mask }; }
109 template<
typename _CharT,
typename _Traits>
110 inline basic_istream<_CharT, _Traits>&
111 operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
113 __is.setf(__f._M_mask);
117 template<
typename _CharT,
typename _Traits>
121 __os.
setf(__f._M_mask);
126 struct _Setbase {
int _M_base; };
138 {
return { __base }; }
140 template<
typename _CharT,
typename _Traits>
141 inline basic_istream<_CharT, _Traits>&
142 operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
151 template<
typename _CharT,
typename _Traits>
163 template<
typename _CharT>
164 struct _Setfill { _CharT _M_c; };
173 template<
typename _CharT>
174 inline _Setfill<_CharT>
178 template<
typename _CharT,
typename _Traits>
179 __attribute__((__deprecated__(
"'std::setfill' should only be used with "
181 inline basic_istream<_CharT, _Traits>&
182 operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
188 template<
typename _CharT,
typename _Traits>
197 struct _Setprecision {
int _M_n; };
210 template<
typename _CharT,
typename _Traits>
211 inline basic_istream<_CharT, _Traits>&
212 operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
214 __is.precision(__f._M_n);
218 template<
typename _CharT,
typename _Traits>
227 struct _Setw {
int _M_n; };
240 template<
typename _CharT,
typename _Traits>
241 inline basic_istream<_CharT, _Traits>&
242 operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
244 __is.width(__f._M_n);
248 template<
typename _CharT,
typename _Traits>
252 __os.
width(__f._M_n);
256#if __cplusplus >= 201103L
258 template<
typename _MoneyT>
259 struct _Get_money { _MoneyT& _M_mon;
bool _M_intl; };
269 template<
typename _MoneyT>
270 inline _Get_money<_MoneyT>
272 {
return { __mon, __intl }; }
274 template<
typename _CharT,
typename _Traits,
typename _MoneyT>
275 basic_istream<_CharT, _Traits>&
276 operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f)
278 typename basic_istream<_CharT, _Traits>::sentry __cerb(__is,
false);
284 typedef istreambuf_iterator<_CharT, _Traits> _Iter;
285 typedef money_get<_CharT, _Iter> _MoneyGet;
288 __mg.get(_Iter(__is.rdbuf()), _Iter(), __f._M_intl,
289 __is, __err, __f._M_mon);
291 __catch(__cxxabiv1::__forced_unwind&)
294 __throw_exception_again;
299 __is.setstate(__err);
305 template<
typename _MoneyT>
306 struct _Put_money {
const _MoneyT& _M_mon;
bool _M_intl; };
316 template<
typename _MoneyT>
317 inline _Put_money<_MoneyT>
319 {
return { __mon, __intl }; }
321 template<
typename _CharT,
typename _Traits,
typename _MoneyT>
322 basic_ostream<_CharT, _Traits>&
323 operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
325 typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os);
331 typedef ostreambuf_iterator<_CharT, _Traits> _Iter;
332 typedef money_put<_CharT, _Iter> _MoneyPut;
335 if (__mp.put(_Iter(__os.rdbuf()), __f._M_intl, __os,
336 __os.fill(), __f._M_mon).failed())
339 __catch(__cxxabiv1::__forced_unwind&)
342 __throw_exception_again;
347 __os.setstate(__err);
352 template<
typename _CharT>
355 const std::tm* _M_tmb;
356 const _CharT* _M_fmt;
368 template<
typename _CharT>
369 inline _Put_time<_CharT>
370 put_time(
const std::tm* __tmb,
const _CharT* __fmt)
371 {
return { __tmb, __fmt }; }
373 template<
typename _CharT,
typename _Traits>
374 basic_ostream<_CharT, _Traits>&
375 operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
377 typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os);
383 typedef ostreambuf_iterator<_CharT, _Traits> _Iter;
384 typedef time_put<_CharT, _Iter> _TimePut;
386 const _CharT*
const __fmt_end = __f._M_fmt +
387 _Traits::length(__f._M_fmt);
390 if (__mp.put(_Iter(__os.rdbuf()), __os, __os.fill(),
391 __f._M_tmb, __f._M_fmt, __fmt_end).failed())
394 __catch(__cxxabiv1::__forced_unwind&)
397 __throw_exception_again;
402 __os.setstate(__err);
407 template<
typename _CharT>
411 const _CharT* _M_fmt;
423 template<
typename _CharT>
424 inline _Get_time<_CharT>
426 {
return { __tmb, __fmt }; }
428 template<
typename _CharT,
typename _Traits>
429 basic_istream<_CharT, _Traits>&
430 operator>>(basic_istream<_CharT, _Traits>& __is, _Get_time<_CharT> __f)
432 typename basic_istream<_CharT, _Traits>::sentry __cerb(__is,
false);
438 typedef istreambuf_iterator<_CharT, _Traits> _Iter;
439 typedef time_get<_CharT, _Iter> _TimeGet;
441 const _CharT*
const __fmt_end = __f._M_fmt +
442 _Traits::length(__f._M_fmt);
445 __mg.get(_Iter(__is.rdbuf()), _Iter(), __is,
446 __err, __f._M_tmb, __f._M_fmt, __fmt_end);
448 __catch(__cxxabiv1::__forced_unwind&)
451 __throw_exception_again;
456 __is.setstate(__err);
461#ifdef __cpp_lib_quoted_string_io
470 template<
typename _CharT>
472 quoted(
const _CharT* __string,
473 _CharT __delim = _CharT(
'"'), _CharT __escape = _CharT(
'\\'))
479 template<
typename _CharT,
typename _Traits,
typename _Alloc>
482 _CharT __delim = _CharT(
'"'), _CharT __escape = _CharT(
'\\'))
486 __string, __delim, __escape);
489 template<
typename _CharT,
typename _Traits,
typename _Alloc>
492 _CharT __delim = _CharT(
'"'), _CharT __escape = _CharT(
'\\'))
496 __string, __delim, __escape);
499#if __cplusplus >= 201703L
502 template<
typename _CharT,
typename _Traits>
505 _CharT __delim = _CharT(
'"'), _CharT __escape = _CharT(
'\\'))
518#if _GLIBCXX_EXTERN_TEMPLATE
532#ifdef _GLIBCXX_USE_WCHAR_T
548_GLIBCXX_END_NAMESPACE_VERSION
551#pragma GCC diagnostic pop
basic_ostream< char > ostream
Base class for char output streams.
basic_istream< char > istream
Base class for char input streams.
basic_ostream< wchar_t > wostream
Base class for wchar_t output streams.
basic_istream< wchar_t > wistream
Base class for wchar_t input streams.
class __attribute((__abi_tag__("cxx11"))) failure typedef _Ios_Fmtflags fmtflags
These are thrown to indicate problems with io.
const _Facet & use_facet(const locale &__loc)
Return a facet.
ISO C++ entities toplevel namespace is std.
_Put_time< _CharT > put_time(const std::tm *__tmb, const _CharT *__fmt)
Extended manipulator for formatting time.
_Resetiosflags resetiosflags(ios_base::fmtflags __mask)
Manipulator for setf.
_Get_money< _MoneyT > get_money(_MoneyT &__mon, bool __intl=false)
Extended manipulator for extracting money.
_Setw setw(int __n)
Manipulator for width.
_Setprecision setprecision(int __n)
Manipulator for precision.
_Setfill< _CharT > setfill(_CharT __c)
Manipulator for fill.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
_Put_money< _MoneyT > put_money(const _MoneyT &__mon, bool __intl=false)
Extended manipulator for inserting money.
_Setiosflags setiosflags(ios_base::fmtflags __mask)
Manipulator for setf.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
_Get_time< _CharT > get_time(std::tm *__tmb, const _CharT *__fmt)
Extended manipulator for extracting time.
_Setbase setbase(int __base)
Manipulator for setf.
char_type fill() const
Retrieves the empty character.
Template class basic_ostream.
A non-owning reference to a string.
Managing sequences of characters and character-like objects.
fmtflags setf(fmtflags __fmtfl)
Setting new format flags.
_Ios_Iostate iostate
This is a bitmask type.
static const fmtflags hex
Converts integer input or generates integer output in hexadecimal base.
static const fmtflags basefield
A mask of dec|oct|hex. Useful for the 2-arg form of setf.
streamsize precision() const
Flags access.
static const fmtflags dec
Converts integer input or generates integer output in decimal base.
static const iostate goodbit
Indicates all is well.
static const iostate badbit
Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error fro...
streamsize width() const
Flags access.
static const fmtflags oct
Converts integer input or generates integer output in octal base.
Struct for delimited strings.