1 // Iostreams base classes -*- C++ -*-
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
4 // 2006, 2007, 2008, 2009, 2010
5 // Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // Under Section 7 of GPL version 3, you are granted additional
19 // permissions described in the GCC Runtime Library Exception, version
20 // 3.1, as published by the Free Software Foundation.
22 // You should have received a copy of the GNU General Public License and
23 // a copy of the GCC Runtime Library Exception along with this program;
24 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 // <http://www.gnu.org/licenses/>.
27 /** @file bits/ios_base.h
28 * This is an internal header file, included by other library headers.
29 * Do not attempt to use it directly. @headername{ios}
33 // ISO C++ 14882: 27.4 Iostreams base classes
39 #pragma GCC system_header
41 #include <ext/atomicity.h>
42 #include <bits/localefwd.h>
43 #include <bits/locale_classes.h>
45 namespace std
_GLIBCXX_VISIBILITY(default)
47 _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 // The following definitions of bitmask types are enums, not ints,
50 // as permitted (but not required) in the standard, in order to provide
51 // better type safety in iostream calls. A side effect is that
52 // expressions involving them are no longer compile-time constants.
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
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
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
129 operator~(_Ios_Openmode __a
)
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
167 operator~(_Ios_Iostate __a
)
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
191 // 27.4.2 Class ios_base
193 * @brief The base of the I/O class hierarchy.
196 * This class defines everything that can be defined about I/O that does
197 * not depend on the type of characters being input or output. Most
198 * people will only see @c ios_base when they need to specify the full
199 * name of the various I/O flags (e.g., the openmodes).
206 * @brief These are thrown to indicate problems with io.
207 * @ingroup exceptions
209 * 27.4.2.1.1 Class ios_base::failure
211 class failure
: public exception
214 // _GLIBCXX_RESOLVE_LIB_DEFECTS
215 // 48. Use of non-existent exception constructor
217 failure(const string
& __str
) throw();
219 // This declaration is not useless:
220 // http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Vague-Linkage.html
225 what() const throw();
231 // 27.4.2.1.2 Type ios_base::fmtflags
233 * @brief This is a bitmask type.
235 * @c @a _Ios_Fmtflags is implementation-defined, but it is valid to
236 * perform bitwise operations on these values and expect the Right
237 * Thing to happen. Defined objects of type fmtflags are:
257 typedef _Ios_Fmtflags fmtflags
;
259 /// Insert/extract @c bool in alphabetic rather than numeric format.
260 static const fmtflags boolalpha
= _S_boolalpha
;
262 /// Converts integer input or generates integer output in decimal base.
263 static const fmtflags dec
= _S_dec
;
265 /// Generate floating-point output in fixed-point notation.
266 static const fmtflags fixed
= _S_fixed
;
268 /// Converts integer input or generates integer output in hexadecimal base.
269 static const fmtflags hex
= _S_hex
;
271 /// Adds fill characters at a designated internal point in certain
272 /// generated output, or identical to @c right if no such point is
274 static const fmtflags internal
= _S_internal
;
276 /// Adds fill characters on the right (final positions) of certain
277 /// generated output. (I.e., the thing you print is flush left.)
278 static const fmtflags left
= _S_left
;
280 /// Converts integer input or generates integer output in octal base.
281 static const fmtflags oct
= _S_oct
;
283 /// Adds fill characters on the left (initial positions) of certain
284 /// generated output. (I.e., the thing you print is flush right.)
285 static const fmtflags right
= _S_right
;
287 /// Generates floating-point output in scientific notation.
288 static const fmtflags scientific
= _S_scientific
;
290 /// Generates a prefix indicating the numeric base of generated integer
292 static const fmtflags showbase
= _S_showbase
;
294 /// Generates a decimal-point character unconditionally in generated
295 /// floating-point output.
296 static const fmtflags showpoint
= _S_showpoint
;
298 /// Generates a + sign in non-negative generated numeric output.
299 static const fmtflags showpos
= _S_showpos
;
301 /// Skips leading white space before certain input operations.
302 static const fmtflags skipws
= _S_skipws
;
304 /// Flushes output after each output operation.
305 static const fmtflags unitbuf
= _S_unitbuf
;
307 /// Replaces certain lowercase letters with their uppercase equivalents
308 /// in generated output.
309 static const fmtflags uppercase
= _S_uppercase
;
311 /// A mask of left|right|internal. Useful for the 2-arg form of @c setf.
312 static const fmtflags adjustfield
= _S_adjustfield
;
314 /// A mask of dec|oct|hex. Useful for the 2-arg form of @c setf.
315 static const fmtflags basefield
= _S_basefield
;
317 /// A mask of scientific|fixed. Useful for the 2-arg form of @c setf.
318 static const fmtflags floatfield
= _S_floatfield
;
320 // 27.4.2.1.3 Type ios_base::iostate
322 * @brief This is a bitmask type.
324 * @c @a _Ios_Iostate is implementation-defined, but it is valid to
325 * perform bitwise operations on these values and expect the Right
326 * Thing to happen. Defined objects of type iostate are:
332 typedef _Ios_Iostate iostate
;
334 /// Indicates a loss of integrity in an input or output sequence (such
335 /// as an irrecoverable read error from a file).
336 static const iostate badbit
= _S_badbit
;
338 /// Indicates that an input operation reached the end of an input sequence.
339 static const iostate eofbit
= _S_eofbit
;
341 /// Indicates that an input operation failed to read the expected
342 /// characters, or that an output operation failed to generate the
343 /// desired characters.
344 static const iostate failbit
= _S_failbit
;
346 /// Indicates all is well.
347 static const iostate goodbit
= _S_goodbit
;
349 // 27.4.2.1.4 Type ios_base::openmode
351 * @brief This is a bitmask type.
353 * @c @a _Ios_Openmode is implementation-defined, but it is valid to
354 * perform bitwise operations on these values and expect the Right
355 * Thing to happen. Defined objects of type openmode are:
363 typedef _Ios_Openmode openmode
;
365 /// Seek to end before each write.
366 static const openmode app
= _S_app
;
368 /// Open and seek to end immediately after opening.
369 static const openmode ate
= _S_ate
;
371 /// Perform input and output in binary mode (as opposed to text mode).
372 /// This is probably not what you think it is; see
373 /// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch27s02.html
374 static const openmode binary
= _S_bin
;
376 /// Open for input. Default for @c ifstream and fstream.
377 static const openmode in
= _S_in
;
379 /// Open for output. Default for @c ofstream and fstream.
380 static const openmode out
= _S_out
;
382 /// Open for input. Default for @c ofstream.
383 static const openmode trunc
= _S_trunc
;
385 // 27.4.2.1.5 Type ios_base::seekdir
387 * @brief This is an enumerated type.
389 * @c @a _Ios_Seekdir is implementation-defined. Defined values
390 * of type seekdir are:
392 * - cur, equivalent to @c SEEK_CUR in the C standard library.
393 * - end, equivalent to @c SEEK_END in the C standard library.
395 typedef _Ios_Seekdir seekdir
;
397 /// Request a seek relative to the beginning of the stream.
398 static const seekdir beg
= _S_beg
;
400 /// Request a seek relative to the current position within the sequence.
401 static const seekdir cur
= _S_cur
;
403 /// Request a seek relative to the current end of the sequence.
404 static const seekdir end
= _S_end
;
407 typedef int io_state
;
408 typedef int open_mode
;
409 typedef int seek_dir
;
411 typedef std::streampos streampos
;
412 typedef std::streamoff streamoff
;
416 * @brief The set of events that may be passed to an event callback.
418 * erase_event is used during ~ios() and copyfmt(). imbue_event is used
419 * during imbue(). copyfmt_event is used during copyfmt().
429 * @brief The type of an event callback function.
430 * @param event One of the members of the event enum.
431 * @param ios_base Reference to the ios_base object.
432 * @param int The integer provided when the callback was registered.
434 * Event callbacks are user defined functions that get called during
435 * several ios_base and basic_ios functions, specifically imbue(),
436 * copyfmt(), and ~ios().
438 typedef void (*event_callback
) (event
, ios_base
&, int);
441 * @brief Add the callback __fn with parameter __index.
442 * @param __fn The function to add.
443 * @param __index The integer to pass to the function when invoked.
445 * Registers a function as an event callback with an integer parameter to
446 * be passed to the function when invoked. Multiple copies of the
447 * function are allowed. If there are multiple callbacks, they are
448 * invoked in the order they were registered.
451 register_callback(event_callback __fn
, int __index
);
454 streamsize _M_precision
;
457 iostate _M_exception
;
458 iostate _M_streambuf_state
;
460 // 27.4.2.6 Members for callbacks
461 // 27.4.2.6 ios_base callbacks
462 struct _Callback_list
465 _Callback_list
* _M_next
;
466 ios_base::event_callback _M_fn
;
468 _Atomic_word _M_refcount
; // 0 means one reference.
470 _Callback_list(ios_base::event_callback __fn
, int __index
,
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); }
477 // 0 => OK to delete.
479 _M_remove_reference()
481 // Be race-detector-friendly. For more info see bits/c++config.
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();
500 // 27.4.2.5 Members for iword/pword storage
505 _Words() : _M_pword(0), _M_iword(0) { }
508 // Only for failed iword/pword calls.
511 // Guaranteed storage.
512 // The first 5 iword and pword slots are reserved for internal use.
513 enum { _S_local_word_size
= 8 };
514 _Words _M_local_word
[_S_local_word_size
];
516 // Allocated storage.
521 _M_grow_words(int __index
, bool __iword
);
523 // Members for locale and locale caching.
524 locale _M_ios_locale
;
531 // 27.4.2.1.6 Class ios_base::Init
532 // Used to initialize standard streams. In theory, g++ could use
533 // -finit-priority to order this stuff correctly without going
534 // through these machinations.
537 friend class ios_base
;
543 static _Atomic_word _S_refcount
;
544 static bool _S_synced_with_stdio
;
547 // [27.4.2.2] fmtflags state functions
549 * @brief Access to format flags.
550 * @return The format control flags for both input and output.
557 * @brief Setting new format flags all at once.
558 * @param fmtfl The new flags to set.
559 * @return The previous format control flags.
561 * This function overwrites all the format flags with @a fmtfl.
564 flags(fmtflags __fmtfl
)
566 fmtflags __old
= _M_flags
;
572 * @brief Setting new format flags.
573 * @param fmtfl Additional flags to set.
574 * @return The previous format control flags.
576 * This function sets additional flags in format control. Flags that
577 * were previously set remain set.
580 setf(fmtflags __fmtfl
)
582 fmtflags __old
= _M_flags
;
588 * @brief Setting new format flags.
589 * @param fmtfl Additional flags to set.
590 * @param mask The flags mask for @a fmtfl.
591 * @return The previous format control flags.
593 * This function clears @a mask in the format flags, then sets
594 * @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield.
597 setf(fmtflags __fmtfl
, fmtflags __mask
)
599 fmtflags __old
= _M_flags
;
601 _M_flags
|= (__fmtfl
& __mask
);
606 * @brief Clearing format flags.
607 * @param mask The flags to unset.
609 * This function clears @a mask in the format flags.
612 unsetf(fmtflags __mask
)
613 { _M_flags
&= ~__mask
; }
616 * @brief Flags access.
617 * @return The precision to generate on certain output operations.
619 * Be careful if you try to give a definition of @a precision here; see
624 { return _M_precision
; }
627 * @brief Changing flags.
628 * @param prec The new precision value.
629 * @return The previous value of precision().
632 precision(streamsize __prec
)
634 streamsize __old
= _M_precision
;
635 _M_precision
= __prec
;
640 * @brief Flags access.
641 * @return The minimum field width to generate on output operations.
643 * <em>Minimum field width</em> refers to the number of characters.
650 * @brief Changing flags.
651 * @param wide The new width value.
652 * @return The previous value of width().
655 width(streamsize __wide
)
657 streamsize __old
= _M_width
;
662 // [27.4.2.4] ios_base static members
664 * @brief Interaction with the standard C I/O objects.
665 * @param sync Whether to synchronize or not.
666 * @return True if the standard streams were previously synchronized.
668 * The synchronization referred to is @e only that between the standard
669 * C facilities (e.g., stdout) and the standard C++ objects (e.g.,
670 * cout). User-declared streams are unaffected. See
671 * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch28s02.html
674 sync_with_stdio(bool __sync
= true);
676 // [27.4.2.3] ios_base locale functions
678 * @brief Setting a new locale.
679 * @param loc The new locale.
680 * @return The previous locale.
682 * Sets the new locale for this stream, and then invokes each callback
686 imbue(const locale
& __loc
) throw();
689 * @brief Locale access
690 * @return A copy of the current locale.
692 * If @c imbue(loc) has previously been called, then this function
693 * returns @c loc. Otherwise, it returns a copy of @c std::locale(),
694 * the global C++ locale.
698 { return _M_ios_locale
; }
701 * @brief Locale access
702 * @return A reference to the current locale.
704 * Like getloc above, but returns a reference instead of
709 { return _M_ios_locale
; }
711 // [27.4.2.5] ios_base storage functions
713 * @brief Access to unique indices.
714 * @return An integer different from all previous calls.
716 * This function returns a unique integer every time it is called. It
717 * can be used for any purpose, but is primarily intended to be a unique
718 * index for the iword and pword functions. The expectation is that an
719 * application calls xalloc in order to obtain an index in the iword and
720 * pword arrays that can be used without fear of conflict.
722 * The implementation maintains a static variable that is incremented and
723 * returned on each invocation. xalloc is guaranteed to return an index
724 * that is safe to use in the iword and pword arrays.
730 * @brief Access to integer array.
731 * @param __ix Index into the array.
732 * @return A reference to an integer associated with the index.
734 * The iword function provides access to an array of integers that can be
735 * used for any purpose. The array grows as required to hold the
736 * supplied index. All integers in the array are initialized to 0.
738 * The implementation reserves several indices. You should use xalloc to
739 * obtain an index that is safe to use. Also note that since the array
740 * can grow dynamically, it is not safe to hold onto the reference.
745 _Words
& __word
= (__ix
< _M_word_size
)
746 ? _M_word
[__ix
] : _M_grow_words(__ix
, true);
747 return __word
._M_iword
;
751 * @brief Access to void pointer array.
752 * @param __ix Index into the array.
753 * @return A reference to a void* associated with the index.
755 * The pword function provides access to an array of pointers that can be
756 * used for any purpose. The array grows as required to hold the
757 * supplied index. All pointers in the array are initialized to 0.
759 * The implementation reserves several indices. You should use xalloc to
760 * obtain an index that is safe to use. Also note that since the array
761 * can grow dynamically, it is not safe to hold onto the reference.
766 _Words
& __word
= (__ix
< _M_word_size
)
767 ? _M_word
[__ix
] : _M_grow_words(__ix
, false);
768 return __word
._M_pword
;
773 * Invokes each callback with erase_event. Destroys local storage.
775 * Note that the ios_base object for the standard streams never gets
776 * destroyed. As a result, any callbacks registered with the standard
777 * streams will not get invoked with erase_event (unless copyfmt is
785 // _GLIBCXX_RESOLVE_LIB_DEFECTS
786 // 50. Copy constructor and assignment operator of ios_base
788 ios_base(const ios_base
&);
791 operator=(const ios_base
&);
794 // [27.4.5.1] fmtflags manipulators
795 /// Calls base.setf(ios_base::boolalpha).
797 boolalpha(ios_base
& __base
)
799 __base
.setf(ios_base::boolalpha
);
803 /// Calls base.unsetf(ios_base::boolalpha).
805 noboolalpha(ios_base
& __base
)
807 __base
.unsetf(ios_base::boolalpha
);
811 /// Calls base.setf(ios_base::showbase).
813 showbase(ios_base
& __base
)
815 __base
.setf(ios_base::showbase
);
819 /// Calls base.unsetf(ios_base::showbase).
821 noshowbase(ios_base
& __base
)
823 __base
.unsetf(ios_base::showbase
);
827 /// Calls base.setf(ios_base::showpoint).
829 showpoint(ios_base
& __base
)
831 __base
.setf(ios_base::showpoint
);
835 /// Calls base.unsetf(ios_base::showpoint).
837 noshowpoint(ios_base
& __base
)
839 __base
.unsetf(ios_base::showpoint
);
843 /// Calls base.setf(ios_base::showpos).
845 showpos(ios_base
& __base
)
847 __base
.setf(ios_base::showpos
);
851 /// Calls base.unsetf(ios_base::showpos).
853 noshowpos(ios_base
& __base
)
855 __base
.unsetf(ios_base::showpos
);
859 /// Calls base.setf(ios_base::skipws).
861 skipws(ios_base
& __base
)
863 __base
.setf(ios_base::skipws
);
867 /// Calls base.unsetf(ios_base::skipws).
869 noskipws(ios_base
& __base
)
871 __base
.unsetf(ios_base::skipws
);
875 /// Calls base.setf(ios_base::uppercase).
877 uppercase(ios_base
& __base
)
879 __base
.setf(ios_base::uppercase
);
883 /// Calls base.unsetf(ios_base::uppercase).
885 nouppercase(ios_base
& __base
)
887 __base
.unsetf(ios_base::uppercase
);
891 /// Calls base.setf(ios_base::unitbuf).
893 unitbuf(ios_base
& __base
)
895 __base
.setf(ios_base::unitbuf
);
899 /// Calls base.unsetf(ios_base::unitbuf).
901 nounitbuf(ios_base
& __base
)
903 __base
.unsetf(ios_base::unitbuf
);
907 // [27.4.5.2] adjustfield manipulators
908 /// Calls base.setf(ios_base::internal, ios_base::adjustfield).
910 internal(ios_base
& __base
)
912 __base
.setf(ios_base::internal
, ios_base::adjustfield
);
916 /// Calls base.setf(ios_base::left, ios_base::adjustfield).
918 left(ios_base
& __base
)
920 __base
.setf(ios_base::left
, ios_base::adjustfield
);
924 /// Calls base.setf(ios_base::right, ios_base::adjustfield).
926 right(ios_base
& __base
)
928 __base
.setf(ios_base::right
, ios_base::adjustfield
);
932 // [27.4.5.3] basefield manipulators
933 /// Calls base.setf(ios_base::dec, ios_base::basefield).
935 dec(ios_base
& __base
)
937 __base
.setf(ios_base::dec
, ios_base::basefield
);
941 /// Calls base.setf(ios_base::hex, ios_base::basefield).
943 hex(ios_base
& __base
)
945 __base
.setf(ios_base::hex
, ios_base::basefield
);
949 /// Calls base.setf(ios_base::oct, ios_base::basefield).
951 oct(ios_base
& __base
)
953 __base
.setf(ios_base::oct
, ios_base::basefield
);
957 // [27.4.5.4] floatfield manipulators
958 /// Calls base.setf(ios_base::fixed, ios_base::floatfield).
960 fixed(ios_base
& __base
)
962 __base
.setf(ios_base::fixed
, ios_base::floatfield
);
966 /// Calls base.setf(ios_base::scientific, ios_base::floatfield).
968 scientific(ios_base
& __base
)
970 __base
.setf(ios_base::scientific
, ios_base::floatfield
);
974 _GLIBCXX_END_NAMESPACE_VERSION
977 #endif /* _IOS_BASE_H */