STD::BASIC_OSTRINGSTREAM(3cxx)

๐ŸŒธ NAME ๐ŸŒธ

This is the page for std::basic_ostringstream< _CharT, _Traits, _Alloc > in the (3cxx) manual, bestie. Its whole job? Controlling output for std::string. That's the vibe, that's the mission. ๐ŸŽ€


โœจ SYNOPSIS โœจ

#include <sstream>

Inherits std::basic_ostream< _CharT, _Traits >.

๐ŸŽ€ Public Types ๐ŸŽ€

The type-alias wardrobe is right here โ€” every single one, no skips:

  • typedef ctype< _CharT > __ctype_type โ€” Listed with no extra note in the source.
  • typedef basic_ios< _CharT, _Traits > __ios_type โ€” Listed with no extra note in the source.
  • typedef num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > __num_put_type โ€” Listed with no extra note in the source.
  • typedef basic_ostream< char_type, traits_type > __ostream_type โ€” Listed with no extra note in the source.
  • typedef basic_streambuf< _CharT, _Traits > __streambuf_type โ€” Listed with no extra note in the source.
  • typedef basic_string< _CharT, _Traits, _Alloc > __string_type โ€” Listed with no extra note in the source.
  • typedef basic_stringbuf< _CharT, _Traits, _Alloc > __stringbuf_type โ€” Listed with no extra note in the source.
  • typedef _Alloc allocator_type โ€” Listed with no extra note in the source.
  • typedef _CharT char_type โ€” Listed with no extra note in the source.
  • enum event { erase_event, imbue_event, copyfmt_event } โ€” The set of events that may be passed to an event callback.
  • typedef void(* event_callback) (event __e, ios_base &__b, int __i) โ€” The type of an event callback function.
  • typedef _Ios_Fmtflags fmtflags โ€” This is a bitmask type.
  • typedef traits_type::int_type int_type โ€” Listed with no extra note in the source.
  • typedef _Ios_Iostate iostate โ€” This is a bitmask type.
  • typedef traits_type::off_type off_type โ€” Listed with no extra note in the source.
  • typedef _Ios_Openmode openmode โ€” This is a bitmask type.
  • typedef traits_type::pos_type pos_type โ€” Listed with no extra note in the source.
  • typedef _Ios_Seekdir seekdir โ€” This is an enumerated type.
  • typedef _Traits traits_type โ€” Listed with no extra note in the source.
  • typedef num_get< _CharT, istreambuf_iterator< _CharT, _Traits > > __num_get_type โ€” Listed with no extra note in the source.

๐Ÿ’… Public Member Functions ๐Ÿ’…

Okay, here's the full member-function lineup, in order, no disappearing acts:

  • basic_ostringstream () โ€” Default constructor starts with an empty string buffer.
  • basic_ostringstream (basic_ostringstream &&__rhs) โ€” Listed with no extra note in the source.
  • basic_ostringstream (const __string_type &__str, ios_base::openmode __mode=ios_base::out) โ€” Starts with an existing string buffer.
  • basic_ostringstream (const basic_ostringstream &)=delete โ€” Listed as =delete; no extra note in the source.
  • basic_ostringstream (ios_base::openmode __mode) โ€” Starts with an empty string buffer.
  • ~basic_ostringstream () โ€” The destructor does nothing. Literally nothing. Iconic.
  • const locale & _M_getloc () const โ€” Locale access.
  • template<typename _ValueT > basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v) โ€” Listed with no extra note in the source.
  • void _M_setstate (iostate __state) โ€” Listed with no extra note in the source.
  • bool bad () const โ€” Fast error checking.
  • void clear (iostate __state=goodbit) โ€” [Re]sets the error state.
  • basic_ios & copyfmt (const basic_ios &__rhs) โ€” Copies fields of __rhs into this.
  • bool eof () const โ€” Fast error checking.
  • iostate exceptions () const โ€” Throwing exceptions on errors.
  • void exceptions (iostate __except) โ€” Throwing exceptions on errors.
  • bool fail () const โ€” Fast error checking.
  • char_type fill () const โ€” Retrieves the empty character.
  • char_type fill (char_type __ch) โ€” Sets a new empty character.
  • fmtflags flags () const โ€” Access to format flags.
  • fmtflags flags (fmtflags __fmtfl) โ€” Setting new format flags all at once.
  • __ostream_type & flush () โ€” Synchronizing the stream buffer.
  • locale getloc () const โ€” Locale access.
  • bool good () const โ€” Fast error checking.
  • locale imbue (const locale &__loc) โ€” Moves to a new locale.
  • long & iword (int __ix) โ€” Access to integer array.
  • char narrow (char_type __c, char __dfault) const โ€” Squeezes characters.
  • __ostream_type & operator<< (__streambuf_type *__sb) โ€” Extracting from another streambuf.
  • __ostream_type & operator<< (const void *__p) โ€” Pointer arithmetic inserters.
  • __ostream_type & operator<< (nullptr_t) โ€” Listed with no extra note in the source.
  • basic_ostringstream & operator= (basic_ostringstream &&__rhs) โ€” Listed with no extra note in the source.
  • basic_ostringstream & operator= (const basic_ostringstream &)=delete โ€” Listed as =delete; no extra note in the source.
  • streamsize precision () const โ€” Flags access.
  • streamsize precision (streamsize __prec) โ€” Changing flags.
  • void *& pword (int __ix) โ€” Access to void pointer array.
  • __stringbuf_type * rdbuf () const โ€” Accessing the underlying buffer.
  • basic_streambuf< _CharT, _Traits > * rdbuf (basic_streambuf< _CharT, _Traits > *__sb) โ€” Changing the underlying buffer.
  • iostate rdstate () const โ€” Returns the error state of the stream buffer.
  • void register_callback (event_callback __fn, int __index) โ€” Add the callback __fn with parameter __index.
  • __ostream_type & seekp (off_type, ios_base::seekdir) โ€” Changing the current write position.
  • __ostream_type & seekp (pos_type) โ€” Changing the current write position.
  • fmtflags setf (fmtflags __fmtfl) โ€” Setting new format flags.
  • fmtflags setf (fmtflags __fmtfl, fmtflags __mask) โ€” Setting new format flags.
  • void setstate (iostate __state) โ€” Sets additional flags in the error state.
  • __string_type str () const โ€” Copying out the string buffer.
  • void str (const __string_type &__s) โ€” Setting a new buffer.
  • void swap (basic_ostringstream &__rhs) โ€” Listed with no extra note in the source.
  • pos_type tellp () โ€” Getting the current write position.
  • basic_ostream< _CharT, _Traits > * tie () const โ€” Fetches the current tied stream.
  • basic_ostream< _CharT, _Traits > * tie (basic_ostream< _CharT, _Traits > *__tiestr) โ€” Ties this stream to an output stream.
  • void unsetf (fmtflags __mask) โ€” Clearing format flags.
  • basic_string_view< char_type, traits_type > view () const noexcept โ€” Listed with no extra note in the source.
  • char_type widen (char __c) const โ€” Widens characters.
  • streamsize width () const โ€” Flags access.
  • streamsize width (streamsize __wide) โ€” Changing flags.
  • __ostream_type & operator<< (__ostream_type &(*__pf)(__ostream_type &)) โ€” Interface for manipulators.
  • __ostream_type & operator<< (__ios_type &(*__pf)(__ios_type &)) โ€” Interface for manipulators.
  • __ostream_type & operator<< (ios_base &(*__pf)(ios_base &)) โ€” Interface for manipulators.

๐Ÿ”ฅ Inserters ๐Ÿ”ฅ

Okay so every single operator<< function โ€” aka every formatted output function โ€” has the same opening act. Each one starts by constructing a temporary object of type std::basic_ostream::sentry. That little icon can have several effects, and it finishes up by setting a status flag. See the sentry documentation for more tea. ๐Ÿซถ

If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.

If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without causing an ios_base::failure to be thrown. Then the original exception is rethrown. Periodt. ๐Ÿ’…

  • __ostream_type & operator<< (long __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (unsigned long __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (bool __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (short __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (unsigned short __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (int __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (unsigned int __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (long long __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (unsigned long long __n) โ€” Integer arithmetic inserter.
  • __ostream_type & operator<< (double __f) โ€” Floating point arithmetic inserter.
  • __ostream_type & operator<< (float __f) โ€” Floating point arithmetic inserter.
  • __ostream_type & operator<< (long double __f) โ€” Floating point arithmetic inserter.

๐Ÿฆ‹ Unformatted Output Functions ๐Ÿฆ‹

All the unformatted output functions share some behavior, bestie. Each one starts by constructing a temporary object of type std::basic_ostream::sentry. This has several effects, and it concludes with the setting of a status flag โ€” see the sentry documentation for more. ๐ŸŒธ

If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.

If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state. If badbit is on in the stream's exceptions mask, the exception will be rethrown without completing its actions. That's the warning, don't skip it. ๐Ÿ’€

  • __ostream_type & put (char_type __c) โ€” Simple insertion.
  • __ostream_type & write (const char_type *__s, streamsize __n) โ€” Character string insertion.
  • operator bool () const โ€” The quick-and-easy status check.
  • bool operator! () const โ€” The quick-and-easy status check.

โญ Static Public Member Functions โญ

  • static bool sync_with_stdio (bool __sync=true) โ€” Interaction with the standard C I/O objects.
  • static int xalloc () throw () โ€” Access to unique indices.

โœจ Static Public Attributes โœจ

  • static const openmode __noreplace โ€” bestie, the docs literally just list this one with no description attached. No cap.
  • static const fmtflags adjustfield โ€” it's the mask left|right|internal, and it's useful for the 2-arg form of setf.
  • static const openmode app โ€” seek to the end before every single write.
  • static const openmode ate โ€” open it, then immediately seek to the end right after opening.
  • static const iostate badbit โ€” this one means a loss of integrity in an input or output sequence happened โ€” like an irrecoverable read error from a file. It's giving "something is deeply wrong."
  • static const fmtflags basefield โ€” a mask of dec|oct|hex, useful for the 2-arg form of setf.
  • static const seekdir beg โ€” request a seek relative to the beginning of the stream.
  • static const openmode binary โ€” perform input and output in binary mode (as opposed to text mode). And bestie, this is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.
  • static const fmtflags boolalpha โ€” insert/extract bool in alphabetic format instead of numeric format.
  • static const seekdir cur โ€” request a seek relative to the current position within the sequence.
  • static const fmtflags dec โ€” converts integer input or generates integer output in decimal base.
  • static const seekdir end โ€” request a seek relative to the current end of the sequence.
  • static const iostate eofbit โ€” indicates that an input operation reached the end of an input sequence.
  • static const iostate failbit โ€” indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.
  • static const fmtflags fixed โ€” generate floating-point output in fixed-point notation.
  • static const fmtflags floatfield โ€” a mask of scientific|fixed, useful for the 2-arg form of setf.
  • static const iostate goodbit โ€” indicates all is well. The vibes are immaculate.
  • static const fmtflags hex โ€” converts integer input or generates integer output in hexadecimal base.
  • static const openmode in โ€” open for input. Default for ifstream and fstream.
  • static const fmtflags internal โ€” adds fill characters at a designated internal point in certain generated output, or it's identical to right if no such point is designated.
  • static const fmtflags left โ€” adds fill characters on the right (final positions) of certain generated output. I.e., the thing you print is flush left.
  • static const fmtflags oct โ€” converts integer input or generates integer output in octal base.
  • static const openmode out โ€” open for output. Default for ofstream and fstream.
  • static const fmtflags right โ€” adds fill characters on the left (initial positions) of certain generated output. I.e., the thing you print is flush right.
  • static const fmtflags scientific โ€” generates floating-point output in scientific notation.
  • static const fmtflags showbase โ€” generates a prefix indicating the numeric base of generated integer output.
  • static const fmtflags showpoint โ€” generates a decimal-point character unconditionally in generated floating-point output.
  • static const fmtflags showpos โ€” generates a + sign in non-negative generated numeric output.
  • static const fmtflags skipws โ€” skips leading white space before certain input operations.
  • static const openmode trunc โ€” truncate an existing stream when opening. Default for ofstream.
  • static const fmtflags unitbuf โ€” flushes output after each output operation.
  • static const fmtflags uppercase โ€” replaces certain lowercase letters with their uppercase equivalents in generated output.

๐Ÿ›ก๏ธ Protected Types ๐Ÿ›ก๏ธ

  • enum { _S_local_word_size } โ€” a tiny protected enum with exactly one member, bestie, and that's the whole list.

๐Ÿ”’ Protected Member Functions ๐Ÿ”’

  • void _M_cache_locale (const locale &__loc) โ€” the internal locale-caching hook.
  • void _M_call_callbacks (event __ev) throw () โ€” the internal callback-calling hook.
  • void _M_dispose_callbacks (void) throw () โ€” the internal callback-disposal hook.
  • _Words & _M_grow_words (int __index, bool __iword) โ€” the internal word-growing hook.
  • void _M_init () throw () โ€” the internal init hook.
  • template<typename _ValueT > __ostream_type & _M_insert (_ValueT __v) โ€” the internal insert hook.
  • void _M_move (ios_base &) noexcept โ€” the internal move hook for ios_base.
  • void _M_swap (ios_base &__rhs) noexcept โ€” the internal swap hook for ios_base.
  • void init (basic_streambuf< _CharT, _Traits > *__sb) โ€” all setup is performed here.
  • void move (basic_ios &&__rhs) โ€” move from a basic_ios rvalue reference.
  • void move (basic_ios &__rhs) โ€” move from a basic_ios lvalue reference.
  • void set_rdbuf (basic_streambuf< _CharT, _Traits > *__sb) โ€” the protected set_rdbuf hook.
  • void swap (basic_ios &__rhs) noexcept โ€” swap with another basic_ios.
  • void swap (basic_ostream &__rhs) โ€” swap with a basic_ostream.

๐Ÿงบ Protected Attributes ๐Ÿงบ

  • _Callback_list * _M_callbacks โ€” callback list pointer.
  • const __ctype_type * _M_ctype โ€” the cached ctype facet pointer.
  • iostate _M_exception โ€” the exception-state mask.
  • char_type _M_fill โ€” the fill character.
  • bool _M_fill_init โ€” fill-character initialization flag.
  • fmtflags _M_flags โ€” the formatting flags.
  • locale _M_ios_locale โ€” the locale object.
  • _Words _M_local_word [_S_local_word_size] โ€” the local word array.
  • const __num_get_type * _M_num_get โ€” the cached numeric-get facet pointer.
  • const __num_put_type * _M_num_put โ€” the cached numeric-put facet pointer.
  • streamsize _M_precision โ€” the precision value.
  • basic_streambuf< _CharT, _Traits > * _M_streambuf โ€” the streambuf pointer.
  • iostate _M_streambuf_state โ€” the streambuf state.
  • basic_ostream< _CharT, _Traits > * _M_tie โ€” the tied output stream pointer.
  • streamsize _M_width โ€” the width value.
  • _Words * _M_word โ€” the word pointer.
  • int _M_word_size โ€” the word count.
  • _Words _M_word_zero โ€” the zero word.

๐Ÿ“– Detailed Description ๐Ÿ“–

template<typename _CharT, typename _Traits, typename _Alloc>
class std::basic_ostringstream< _CharT, _Traits, _Alloc >

Okay so this class is literally described as "Controlling output for std::string." Iconic behavior.

Template Parameters

  • _CharT โ€” type of character stream.
  • _Traits โ€” traits for character type, defaults to char_traits<_CharT>.
  • _Alloc โ€” allocator type, defaults to allocator<_CharT>.

This class supports writing to objects of type std::basic_string, using the inherited functions from std::basic_ostream. To control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers to as sb.


๐Ÿท๏ธ Member Typedef Documentation ๐Ÿท๏ธ

๐Ÿซถ __num_get_type (inherited) ๐Ÿซถ

template<typename _CharT , typename _Traits > typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > std::basic_ios< _CharT, _Traits >::__num_get_type [inherited]

These are non-standard types. The docs said it, not me.


๐ŸŽŸ๏ธ event_callback (inherited) ๐ŸŽŸ๏ธ

typedef void(* std::ios_base::event_callback) (event __e, ios_base &__b, int __i) [inherited]

The type of an event callback function.

Parameters

  • __e โ€” one of the members of the event enum.
  • __b โ€” reference to the ios_base object.
  • __i โ€” the integer provided when the callback was registered.

Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically imbue(), copyfmt(), and ~ios().


๐Ÿงš fmtflags (inherited) ๐Ÿงš

typedef _Ios_Fmtflags std::ios_base::fmtflags [inherited]

This is a bitmask type. _Ios_Fmtflags is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen.

Defined objects of type fmtflags are:

  • boolalpha
  • dec
  • fixed
  • hex
  • internal
  • left
  • oct
  • right
  • scientific
  • showbase
  • showpoint
  • showpos
  • skipws
  • unitbuf
  • uppercase
  • adjustfield
  • basefield
  • floatfield

๐Ÿฆ‹ iostate (inherited) ๐Ÿฆ‹

typedef _Ios_Iostate std::ios_base::iostate [inherited]

This is a bitmask type. _Ios_Iostate is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen.

Defined objects of type iostate are:

  • badbit
  • eofbit
  • failbit
  • goodbit

๐ŸŒˆ openmode (inherited) ๐ŸŒˆ

typedef _Ios_Openmode std::ios_base::openmode [inherited]

This is a bitmask type. _Ios_Openmode is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen.

Defined objects of type openmode are:

  • app
  • ate
  • binary
  • in
  • out
  • trunc

โญ seekdir (inherited) โญ

typedef _Ios_Seekdir std::ios_base::seekdir [inherited]

This is an enumerated type. _Ios_Seekdir is implementation-defined.

Defined values of type seekdir are:

  • beg
  • cur, equivalent to SEEK_CUR in the C standard library.
  • end, equivalent to SEEK_END in the C standard library.

๐ŸŽŸ๏ธ Member Enumeration Documentation ๐ŸŽŸ๏ธ

๐Ÿ‘‘ enum std::ios_base::event (inherited) ๐Ÿ‘‘

enum std::ios_base::event [inherited]

The set of events that may be passed to an event callback.

erase_event is used during ~ios() and copyfmt(). imbue_event is used during imbue(). copyfmt_event is used during copyfmt().


๐Ÿ—๏ธ Constructor & Destructor Documentation ๐Ÿ—๏ธ

๐ŸŒฑ basic_ostringstream() [inline] ๐ŸŒฑ

template<typename _CharT , typename _Traits , typename _Alloc > std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream () [inline]

Default constructor starts with an empty string buffer. Initializes sb using mode|out, and passes &sb to the base class initializer. Does not allocate any buffer.

That's a lie. We initialize the base class with NULL, because the string class does its own memory management.

References std::basic_ios< _CharT, _Traits >::init().


๐ŸŒธ basic_ostringstream(ios_base::openmode __mode) [inline], [explicit] ๐ŸŒธ

template<typename _CharT , typename _Traits , typename _Alloc > std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream (ios_base::openmode __mode) [inline], [explicit]

Starts with an empty string buffer.

Parameters

  • __mode โ€” whether the buffer can read, or write, or both.

ios_base::out is automatically included in mode.

Initializes sb using mode|out, and passes &sb to the base class initializer. Does not allocate any buffer.

That's a lie. We initialize the base class with NULL, because the string class does its own memory management.

References std::basic_ios< _CharT, _Traits >::init().


๐Ÿฆ‹ basic_ostringstream(const __string_type & __str, ios_base::openmode __mode = ios_base::out) [inline], [explicit] ๐Ÿฆ‹

template<typename _CharT , typename _Traits , typename _Alloc > std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream (const __string_type & __str, ios_base::openmode __mode = ios_base::out) [inline], [explicit]

Starts with an existing string buffer.

Parameters

  • __str โ€” a string to copy as a starting buffer.
  • __mode โ€” whether the buffer can read, or write, or both.

ios_base::out is automatically included in mode.

Initializes sb using str and mode|out, and passes &sb to the base class initializer.

That's a lie. We initialize the base class with NULL, because the string class does its own memory management.

References std::basic_ios< _CharT, _Traits >::init().


๐ŸŽ€ ~basic_ostringstream() [inline] ๐ŸŽ€

template<typename _CharT , typename _Traits , typename _Alloc > std::basic_ostringstream< _CharT, _Traits, _Alloc >::~basic_ostringstream () [inline]

The destructor does nothing. The buffer is deallocated by the stringbuf object, not the formatting stream.


๐Ÿงฐ Member Function Documentation ๐Ÿงฐ

๐Ÿ” std::ios_base::_M_getloc() const [inline], [inherited] ๐Ÿ”

const locale & std::ios_base::_M_getloc () const [inline], [inherited]

Locale access.

Returns

  • A reference to the current locale.

Like getloc above, but returns a reference instead of generating a copy.

Referenced by (tail end of that previous entry): std::money_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get_date(), std::time_get< _CharT, _InIter >::do_get_monthname(), std::time_get< _CharT, _InIter >::do_get_time(), std::time_get< _CharT, _InIter >::do_get_weekday(), std::time_get< _CharT, _InIter >::do_get_year(), std::num_put< _CharT, _OutIter >::do_put(), std::time_put< _CharT, _OutIter >::do_put(), std::time_get< _CharT, _InIter >::get(), and std::time_put< _CharT, _OutIter >::put().


template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT, _Traits >::bad () const [inline], [inherited]

Bestie, this is your fast error check era. It returns true if the badbit is set.

Heads up: other iostate flags may also be set, so donโ€™t read this as โ€œonly badbit and nothing else, periodt.โ€
  • References: std::ios_base::badbit, and std::basic_ios< _CharT, _Traits >::rdstate().
  • Referenced by: std::basic_ostream< _CharT, _Traits >::sentry::sentry().

template<typename _CharT , typename _Traits > void std::basic_ios< _CharT, _Traits >::clear (iostate __state = goodbit) [inherited]

This one [re]sets the error state. Very โ€œreset the vibeโ€ of it all.

  • Parameters: __state โ€” the new state flag(s) to set.

See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.

  • Referenced by: std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::__detail::operator>>(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ios< _CharT, _Traits >::setstate(), and std::basic_istream< _CharT, _Traits >::unget().

template<typename _CharT , typename _Traits > basic_ios< _CharT, _Traits > & std::basic_ios< _CharT, _Traits >::copyfmt (const basic_ios< _CharT, _Traits > & __rhs) [inherited]

Copies fields of __rhs into this. Itโ€™s giving โ€œclone the formatting, not the actual stream state.โ€

  • Parameters: __rhs โ€” the source values for the copies.
  • Returns: reference to this object.

All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new) callback is invoked with copyfmt_event. The final step is to copy exceptions().

  • References: std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(), std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(), std::tie(), and std::ios_base::width().

template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT, _Traits >::eof () const [inline], [inherited]

Fast error checking, but make it end-of-file coded.

  • Returns: true if the eofbit is set.
Note: other iostate flags may also be set.
  • References: std::ios_base::eofbit, and std::basic_ios< _CharT, _Traits >::rdstate().

template<typename _CharT , typename _Traits > iostate std::basic_ios< _CharT, _Traits >::exceptions () const [inline], [inherited]

Throwing exceptions on errors โ€” this is the getter version.

  • Returns: the current exceptions mask.

This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return value.

  • Referenced by: std::basic_ios< _CharT, _Traits >::copyfmt().

template<typename _CharT , typename _Traits > void std::basic_ios< _CharT, _Traits >::exceptions (iostate __except) [inline], [inherited]

Throwing exceptions on errors โ€” now with setter energy.

  • Parameters: __except โ€” the new exceptions mask.

By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set in the error flags, then an exception of type std::ios_base::failure is thrown.

If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the following under GCC 3.1 or later:

#include <iostream>
#include <fstream>
#include <exception>

int main()
{
    std::set_terminate (__gnu_cxx::__verbose_terminate_handler);

    std::ifstream f ("/etc/motd");

    std::cerr << "Setting badbit\n";
    f.setstate (std::ios_base::badbit);

    std::cerr << "Setting exception mask\n";
    f.exceptions (std::ios_base::badbit);
}
  • References: std::basic_ios< _CharT, _Traits >::clear().

template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT, _Traits >::fail () const [inline], [inherited]

Fast error checking, but this one is a little messy on purpose.

  • Returns: true if either the badbit or the failbit is set.

Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.

  • References: std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
  • Referenced by: std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_istream< _CharT, _Traits >::tellg(), std::basic_ostream< _CharT, _Traits >::tellp(), and std::regex_traits< _Ch_type >::value().

template<typename _CharT , typename _Traits > char_type std::basic_ios< _CharT, _Traits >::fill () const [inline], [inherited]

Retrieves the empty character. The filler character. The padding bestie.

  • Returns: the current fill character.

It defaults to a space (' ') in the current locale.

  • References: std::basic_ios< _CharT, _Traits >::widen().
  • Referenced by: std::basic_ios< _CharT, _Traits >::copyfmt(), and std::basic_ios< _CharT, _Traits >::fill().

template<typename _CharT , typename _Traits > char_type std::basic_ios< _CharT, _Traits >::fill (char_type __ch) [inline], [inherited]

Sets a new empty character. Slay, new padding character acquired.

  • Parameters: __ch โ€” the new character.
  • Returns: the previous fill character.

The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are actually used, and Q<P. It defaults to a space (' ') in the current locale.

  • References: std::basic_ios< _CharT, _Traits >::fill().

fmtflags std::ios_base::flags () const [inline], [inherited]

Access to format flags.

  • Returns: the format control flags for both input and output.
  • Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ios< _CharT, _Traits >::copyfmt(), std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), std::num_put< _CharT, _OutIter >::do_put(), std::normal_distribution< double >::operator()(), std::operator<<(), std::chrono::operator<<(), std::operator>>(), std::operator>>(), std::__detail::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), and std::operator>>().

fmtflags std::ios_base::flags (fmtflags __fmtfl) [inline], [inherited]

Setting new format flags all at once. Itโ€™s the โ€œreplace the whole fitโ€ of format flags.

  • Parameters: __fmtfl โ€” the new flags to set.
  • Returns: the previous format control flags.

This function overwrites all the format flags with __fmtfl.


template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::flush () [inherited]

Synchronizing the stream buffer. Push the vibe out, bestie.

  • Returns: *this

If rdbuf() is a null pointer, changes nothing.

Otherwise, calls rdbuf()->pubsync(), and if that returns -1, sets badbit.

  • References: std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
  • Referenced by: std::flush().

locale std::ios_base::getloc () const [inline], [inherited]

Locale access. Very โ€œwhatโ€™s the current localization situationโ€ of it all.

  • Returns: a copy of the current locale.

If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std::locale(), the global C++ locale.

  • Referenced by: std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(), std::operator>>(), std::operator>>(), and std::ws().

template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT, _Traits >::good () const [inline], [inherited]

Fast error checking, but make it unbothered.

  • Returns: true if no error flags are set.

A wrapper around rdstate.

  • References: std::basic_ios< _CharT, _Traits >::rdstate().
  • Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::__detail::operator>>().

template<typename _CharT , typename _Traits > locale std::basic_ios< _CharT, _Traits >::imbue (const locale & __loc) [inherited]

Moves to a new locale. Locale glow-up, if you will.

  • Parameters: __loc โ€” the new locale.
  • Returns: the previous locale.

Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that bufferโ€™s pubimbue(loc).

Additional l10n notes are at http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html

  • References: std::ios_base::imbue().
  • Referenced by: std::chrono::operator<<().

template<typename _CharT , typename _Traits > void std::basic_ios< _CharT, _Traits >::init (basic_streambuf< _CharT, _Traits > * __sb) [protected], [inherited]

All setup is performed here. This is called from the public constructor. It is not virtual and cannot be redefined.

okay so before we move on, hereโ€™s the โœจreferenced byโœจ list for that constructor โ€” literally every single one, no cap:

  • std::basic_fstream< _CharT, _Traits >::basic_fstream()
  • std::basic_fstream< _CharT, _Traits >::basic_fstream()
  • std::basic_fstream< _CharT, _Traits >::basic_fstream()
  • std::basic_ifstream< _CharT, _Traits >::basic_ifstream()
  • std::basic_ifstream< _CharT, _Traits >::basic_ifstream()
  • std::basic_ifstream< _CharT, _Traits >::basic_ifstream()
  • std::basic_ios< _CharT, _Traits >::basic_ios()
  • std::basic_istream< _CharT, _Traits >::basic_istream()
  • std::basic_istringstream< _CharT, _Traits, _Alloc >::basic_istringstream()
  • std::basic_istringstream< _CharT, _Traits, _Alloc >::basic_istringstream()
  • std::basic_istringstream< _CharT, _Traits, _Alloc >::basic_istringstream()
  • std::basic_ofstream< _CharT, _Traits >::basic_ofstream()
  • std::basic_ofstream< _CharT, _Traits >::basic_ofstream()
  • std::basic_ofstream< _CharT, _Traits >::basic_ofstream()
  • std::basic_ostream< _CharT, _Traits >::basic_ostream()
  • std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream()
  • std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream()
  • std::basic_ostringstream< _CharT, _Traits, _Alloc >::basic_ostringstream()
  • std::basic_stringstream< _CharT, _Traits, _Alloc >::basic_stringstream()
  • std::basic_stringstream< _CharT, _Traits, _Alloc >::basic_stringstream()
  • std::basic_stringstream< _CharT, _Traits, _Alloc >::basic_stringstream()

  • long & std::ios_base::iword (int __ix) [inline], [inherited] โ€” access to the integer array, bestie ๐Ÿงฎ

Parameters: __ix โ€” index into the array.

Returns: a reference to an integer associated with the index.

the iword function provides access to an array of integers that can be used for any purpose. the array grows as required to hold the supplied index. all integers in the array are initialized to 0.

the implementation reserves several indices. you should use xalloc to obtain an index that is safe to use. also note that since the array can grow dynamically, it is not safe to hold onto the reference. ๐Ÿ˜ญ
  • template<typename _CharT , typename _Traits > char std::basic_ios< _CharT, _Traits >::narrow (char_type __c, char __dfault) const [inline], [inherited] โ€” squeezes characters ๐Ÿ‹

Parameters:

  • __c โ€” the character to narrow.
  • __dfault โ€” the character to narrow.

Returns: the narrowed character.

maps a character of char_type to a character of char, if possible.

returns the result of

std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)

additional l10n notes are at http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html โ€” iykyk ๐ŸŒ

  • template<typename _CharT , typename _Traits > std::basic_ios< _CharT, _Traits >::operator bool () const [inline], [explicit], [inherited] โ€” the quick-and-easy status check โœ…

this allows you to write constructs such as if (!a_stream) ... and while (a_stream) ...

References: std::basic_ios< _CharT, _Traits >::fail().

  • template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT, _Traits >::operator! () const [inline], [inherited] โ€” the quick-and-easy status check, but with a ! ๐Ÿ’…

this allows you to write constructs such as if (!a_stream) ... and while (a_stream) ...

References: std::basic_ios< _CharT, _Traits >::fail().


the operator<< era โ€” literally so many inserters, hold my matcha ๐Ÿต

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (__ios_type &(*)(__ios_type &) __pf) [inline], [inherited] โ€” interface for manipulators ๐ŸŽ›๏ธ

manipulators such as std::endl and std::hex use these functions in constructs like 'std::cout << std::endl'. for more information, see the iomanip header.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (__ostream_type &(*)(__ostream_type &) __pf) [inline], [inherited] โ€” interface for manipulators (the other flavor) ๐ŸŽš๏ธ

manipulators such as std::endl and std::hex use these functions in constructs like 'std::cout << std::endl'. for more information, see the iomanip header.

  • template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< (__streambuf_type * __sb) [inherited] โ€” extracting from another streambuf, no cap ๐Ÿซถ

Parameters: __sb โ€” a pointer to a streambuf.

this function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the same error handling behavior.

if __sb is NULL, the stream will set failbit in its error state.

characters are extracted from __sb and inserted into *this until one of the following occurs:

  • the input stream reaches end-of-file,
  • insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted), or
  • an exception occurs while getting a character from __sb, which sets failbit in the error state.

if the function inserts no characters, failbit is set.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (bool __n) [inline], [inherited] โ€” integer arithmetic inserters ๐Ÿ”ข

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (const void * __p) [inline], [inherited] โ€” pointer arithmetic inserters ๐Ÿงท

Parameters: __p โ€” a variable of pointer type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (double __f) [inline], [inherited] โ€” floating point arithmetic inserters ๐Ÿ’ง

Parameters: __f โ€” a variable of builtin floating point type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (float __f) [inline], [inherited] โ€” floating point arithmetic inserters (the float one) ๐ŸŒŠ

Parameters: __f โ€” a variable of builtin floating point type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< (int __n) [inherited] โ€” integer arithmetic inserters (the int one) ๐Ÿ”Ÿ

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (ios_base &(*)(ios_base &) __pf) [inline], [inherited] โ€” interface for manipulators (the ios_base one) ๐ŸŽ›๏ธ

manipulators such as std::endl and std::hex use these functions in constructs like 'std::cout << std::endl'. for more information, see the iomanip header.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (long __n) [inline], [inherited] โ€” integer arithmetic inserters (the long one) ๐Ÿ“

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (long double __f) [inline], [inherited] โ€” floating point arithmetic inserters (the long double one) ๐ŸŒŒ

Parameters: __f โ€” a variable of builtin floating point type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (long long __n) [inline], [inherited] โ€” integer arithmetic inserters (the long long one) ๐Ÿฆ‹

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< (short __n) [inherited] โ€” integer arithmetic inserters (the short one) ๐Ÿฉณ

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

References: std::ios_base::badbit, std::ios_base::goodbit, and std::basic_ios< _CharT, _Traits >::setstate().

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (unsigned int __n) [inline], [inherited] โ€” integer arithmetic inserters (the unsigned int one) ๐ŸŽ€

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (unsigned long __n) [inline], [inherited] โ€” integer arithmetic inserters (the unsigned long one) ๐ŸŒˆ

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (unsigned long long __n) [inline], [inherited] โ€” integer arithmetic inserters (the unsigned long long one) ๐Ÿ’ซ

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.

  • template<typename _CharT , typename _Traits > __ostream_type & std::basic_ostream< _CharT, _Traits >::operator<< (unsigned short __n) [inline], [inherited] โ€” integer arithmetic inserters (the unsigned short one) ๐Ÿ“

Parameters: __n โ€” a variable of builtin integral type.

Returns: *this if successful.

these functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.


  • streamsize std::ios_base::precision () const [inline], [inherited] โ€” flags access ๐Ÿ”

Returns: the precision to generate on certain output operations.

โš ๏ธ okay but be careful if you try to give a definition of precision here โ€” see DR 189. Not me warning you, that's the docs ๐Ÿ’…

Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), and std::chrono::operator<<().


streamsize std::ios_base::precision(streamsize __prec) [inline], [inherited] โ€” changing flags, precision edition โœจ

Parameters:

  • __prec โ€” the new precision value ๐ŸŽš๏ธ

Returns: the previous value of precision(). Like, you hand it the new number and it hands you back the old one โ€” a little exchange ๐Ÿซถ


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::put(char_type __c) [inherited] โ€” simple insertion ๐ŸŒธ

Parameters:

  • __c โ€” the character to insert โœ๏ธ

Returns: *this

Tries to insert __c. That's the whole vibe ๐Ÿ’ซ

๐Ÿ“Œ Note: this function is not overloaded on signed char and unsigned char. iykyk ๐Ÿ™ˆ

References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().

Referenced by std::endl(), and std::ends().


void *& std::ios_base::pword(int __ix) [inline], [inherited] โ€” access to the void pointer array ๐Ÿฆ‹

Parameters:

  • __ix โ€” index into the array ๐Ÿ”ข

Returns: a reference to a void* associated with the index ๐ŸŽฏ

The pword function gives you access to an array of pointers you can use for literally any purpose. The array grows as required to hold the supplied index, main character energy fr fr. All pointers in the array are initialized to 0 ๐Ÿ’€

๐Ÿšจ The implementation reserves several indices. You should use xalloc to obtain an index that's safe to use. Also note: since the array can grow dynamically, it's not safe to hold onto the reference. Don't get attached, bestie ๐Ÿ˜ญ

template<typename _CharT, typename _Traits, typename _Alloc> __stringbuf_type * std::basic_ostringstream< _CharT, _Traits, _Alloc >::rdbuf() const [inline] โ€” accessing the underlying buffer ๐ŸŽ€

Returns: the current basic_stringbuf buffer ๐Ÿ“ฆ

This hides both signatures of std::basic_ios::rdbuf(). Sneaky but iconic ๐Ÿ’…


template<typename _CharT, typename _Traits> basic_streambuf< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::rdbuf(basic_streambuf< _CharT, _Traits > * __sb) [inherited] โ€” changing the underlying buffer ๐ŸŒˆ

Parameters:

  • __sb โ€” the new stream buffer ๐Ÿงบ

Returns: the previous stream buffer ๐Ÿ”

Associates a new buffer with the current stream, and clears the error state โœจ

๐Ÿ’€ Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream     foo;         // or some other derived type
std::streambuf*  p = .....;

foo.ios::rdbuf(p);            // ios == basic_ios<char>

template<typename _CharT, typename _Traits> iostate std::basic_ios< _CharT, _Traits >::rdstate() const [inline], [inherited] โ€” returns the error state of the stream buffer ๐Ÿฉบ

Returns: a bit pattern (well, isn't everything? ๐Ÿ˜Œ)

See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good(). That's the move, ngl ๐Ÿ‘‘

Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(), std::basic_ios< _CharT, _Traits >::good(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ios< _CharT, _Traits >::setstate(), and std::basic_istream< _CharT, _Traits >::unget().


void std::ios_base::register_callback(event_callback __fn, int __index) [inherited] โ€” add the callback ๐Ÿ””

Parameters:

  • __fn โ€” the function to add ๐Ÿงฉ
  • __index โ€” the integer to pass to the function when invoked ๐ŸŽŸ๏ธ

Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered โ€” first come, first served, periodt ๐Ÿ’–


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp(off_type __off, ios_base::seekdir __dir) [inherited] โ€” changing the current write position ๐Ÿงญ

Parameters:

  • __off โ€” a file offset object ๐Ÿ“
  • __dir โ€” the direction in which to seek โžก๏ธ

Returns: *this

If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit ๐Ÿšฉ

References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp(pos_type __pos) [inherited] โ€” changing the current write position, the pos_type remix ๐ŸŒŠ

Parameters:

  • __pos โ€” a file position object ๐Ÿ“

Returns: *this

If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit ๐Ÿšฉ

References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().


fmtflags std::ios_base::setf(fmtflags __fmtfl) [inline], [inherited] โ€” setting new format flags ๐ŸŽ›๏ธ

Parameters:

  • __fmtfl โ€” additional flags to set โž•

Returns: the previous format control flags ๐Ÿ”„

This function sets additional flags in format control. Flags that were previously set remain set โ€” nothing gets wiped, we love a non-destructive queen ๐Ÿ‘‘

Referenced by std::__detail::operator>>().


fmtflags std::ios_base::setf(fmtflags __fmtfl, fmtflags __mask) [inline], [inherited] โ€” setting new format flags, now with a mask ๐ŸŽญ

Parameters:

  • __fmtfl โ€” additional flags to set โž•
  • __mask โ€” the flags mask for fmtfl ๐Ÿซฅ

Returns: the previous format control flags ๐Ÿ”„

This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base::adjustfield. Cute little clear-then-set combo ๐Ÿ’ซ


template<typename _CharT, typename _Traits> void std::basic_ios< _CharT, _Traits >::setstate(iostate __state) [inline], [inherited] โ€” sets additional flags in the error state ๐Ÿšฆ

Parameters:

  • __state โ€” the additional state flag(s) to set ๐Ÿท๏ธ

See std::ios_base::iostate for the possible bit values.

References std::basic_ios< _CharT, _Traits >::clear(), and std::basic_ios< _CharT, _Traits >::rdstate().

Referenced by std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ifstream< _CharT, _Traits >::close(), std::basic_ofstream< _CharT, _Traits >::close(), std::basic_fstream< _CharT, _Traits >::close(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::getline(), std::getline(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::operator<<(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::tr2::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_istream< _CharT, _Traits >::sync(), and std::ws(). (yes that's a LOT of friends, she's booked and busy ๐Ÿ˜ญ๐Ÿ”ฅ)


template<typename _CharT, typename _Traits, typename _Alloc> __string_type std::basic_ostringstream< _CharT, _Traits, _Alloc >::str() const [inline] โ€” copying out the string buffer ๐Ÿ“ค

Returns: rdbuf()->str() ๐ŸŽ

That's it. That's the whole function. Short and slay โœจ


template<typename _CharT, typename _Traits, typename _Alloc> void std::basic_ostringstream< _CharT, _Traits, _Alloc >::str(const __string_type & __s) [inline] โ€” setting a new buffer ๐Ÿ“ฅ

Parameters:

  • __s โ€” the string to use as a new sequence ๐Ÿ”ค

Calls rdbuf()->str(s). Fresh content, who dis ๐Ÿฆ‹


static bool std::ios_base::sync_with_stdio(bool __sync = true) [static], [inherited] โ€” interaction with the standard C I/O objects ๐ŸŒ

Parameters:

  • __sync โ€” whether to synchronize or not ๐Ÿ”€

Returns: true if the standard streams were previously synchronized โœ…

The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the standard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary ๐Ÿ”—


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >::pos_type std::basic_ostream< _CharT, _Traits >::tellp() [inherited] โ€” getting the current write position ๐Ÿ“Œ

Returns: a file position object ๐Ÿ“

If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out) ๐ŸŽฏ

References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf().


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie() const [inline], [inherited] โ€” fetches the current tied stream ๐Ÿชข

Returns: a pointer to the tied stream, or NULL if the stream is not tied ๐Ÿซฅ

A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream is first flushed. For example, std::cin is tied to std::cout. Bestie behavior honestly ๐Ÿซถ

Referenced by std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().


template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie(basic_ostream< _CharT, _Traits > * __tiestr) [inline], [inherited] โ€” ties this stream to an output stream ๐Ÿ’ž

Parameters:

  • __tiestr โ€” the output stream ๐Ÿงต

Returns: the previously tied output stream, or NULL if the stream was not tied ๐Ÿ”™

This sets up a new tie; see tie() for more. It's giving linked-up besties โœจ


void std::ios_base::unsetf(fmtflags __mask) [inline], [inherited] โ€” clearing format flags ๐Ÿงน

Parameters:

  • __mask โ€” the flags to unset โŒ

This function clears __mask in the format flags. Bye bye flags, you had a good run ๐Ÿ’…

๐ŸŒธ widen โ€” the char-to-char_type glow-up โœจ

template<typename _CharT , typename _Traits > char_type std::basic_ios<
    _CharT, _Traits >::widen (char __c) const [inline],  [inherited]

Widens characters. Like, it takes a lil baby char and gives it the full char_type treatment ๐Ÿ’…

Parameters

  • __c โ€” the character to widen, bestie.

Returns

The widened character. Iconic.

It maps a character of char to a character of char_type, and it literally returns the result of:

std::use_facet<ctype<char_type> >(getloc()).widen(c)

Additional l10n notes are at http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html โ€” go read up, iykyk ๐Ÿฆ‹

Referenced by: std::endl(), std::basic_ios< _CharT, _Traits >::fill(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::getline(), std::getline(), std::basic_istream< _CharT, _Traits >::getline(), std::operator<<(), std::operator<<(), and std::tr2::operator>>().


๐ŸŽ€ width (the getter) โ€” flags access, no cap

streamsize std::ios_base::width () const [inline],  [inherited]

Flags access. She's just here to tell you the tea โ˜•

Returns

The minimum field width to generate on output operations.

Minimum field width refers to the number of characters โ€” that's it, that's the whole vibe.

Referenced by: std::basic_ios< _CharT, _Traits >::copyfmt(), std::num_put< _CharT, _OutIter >::do_put(), std::operator>>(), and std::operator>>().


๐Ÿ’œ width (the setter) โ€” changing flags, main character energy

streamsize std::ios_base::width (streamsize __wide) [inline],  [inherited]

Changing flags.</purpose> โ€” set that width, bestie.

Parameters

  • __wide โ€” the new width value.

Returns

The previous value of width(). Not me returning the old one before switching up the fit ๐Ÿ˜ญ that's so it can be restored later, fr fr.


๐Ÿ”ฅ write โ€” character string insertion

template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits
    > & std::basic_ostream< _CharT, _Traits >::write (const char_type * __s,
    streamsize __n) [inherited]

Parameters

  • __s โ€” the array to insert.
  • __n โ€” maximum number of characters to insert. Cap it, periodt.

Returns

*this โ€” she returns herself, queen behaviour ๐Ÿ‘‘

Characters are copied from __s and inserted into the stream until one of the following happens:

  • __n characters are inserted
  • inserting into the output sequence fails โ€” and in that case, badbit will be set in the stream's error state ๐Ÿ’€
Note: This function is not overloaded on signed char and unsigned char. So don't come for her with those, she's not doing it ๐Ÿ™ˆ

โญ xalloc โ€” access to unique indices

static int std::ios_base::xalloc () [static],  [inherited]

Returns

An integer different from all previous calls. Every single time. No repeats, no reruns ๐Ÿ’ซ

This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain an index in the iword and pword arrays that can be used without fear of conflict. Conflict-free index? We love to see it ๐Ÿซถ

The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed to return an index that is safe to use in the iword and pword arrays. Guaranteed. Slay.


๐ŸŒˆ Member Data Documentation ๐ŸŒˆ

Okay bestie, this section is the static-constant hall of fame. All of these are [static] and [inherited], and they're the lore behind all those flag functions you've been calling. Buckle up ๐ŸŽข

๐ŸŒธ adjustfield โ€” the mask of left|right|internal

const fmtflags std::ios_base::adjustfield [static],  [inherited]

A mask of left|right|internal. Useful for the 2-arg form of setf. That's the whole vibe check โœ…

Referenced by: std::num_put< _CharT, _OutIter >::do_put(), std::internal(), std::left(), and std::right().


๐Ÿ“ app โ€” seek to end before each write

const openmode std::ios_base::app [static],  [inherited]

Seek to end before each write. Every. Single. Write. Append mode stays appending, periodt ๐Ÿ’…

Referenced by: std::basic_filebuf< _CharT, _Traits >::_M_set_buffer(), std::basic_filebuf< _CharT, _Traits >::overflow(), and std::basic_filebuf< _CharT, _Traits >::xsputn().


๐Ÿฆ‹ ate โ€” the "open then immediately yeet to the end" one

const openmode std::ios_base::ate [static],  [inherited]

Open and seek to end immediately after opening. Not before each write like app โ€” just once, right after opening. Iykyk, they're different ๐ŸŽ€

Referenced by: std::basic_filebuf< _CharT, _Traits >::open().


๐Ÿ’€ badbit โ€” loss of integrity, not a drill

const iostate std::ios_base::badbit [static],  [inherited]

Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file). Like, the stream is not okay. Irrecoverable. So serious ๐Ÿ˜ญ

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::fail(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< char >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< char >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::sync(), std::basic_istream< char >::tellg(), std::basic_istream< _CharT, _Traits >::tellg(), and std::ws().


๐ŸŒบ basefield โ€” the mask of dec|oct|hex

const fmtflags std::ios_base::basefield [static],  [inherited]

A mask of dec|oct|hex. Useful for the 2-arg form of setf. Number-base flags, all bundled up ๐Ÿ’–

Referenced by: std::dec(), std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), std::hex(), and std::oct().


๐Ÿงš beg โ€” seek from the beginning, obviously

const seekdir std::ios_base::beg [static],  [inherited]

Request a seek relative to the beginning of the stream. The origin story โœจ

Referenced by: std::basic_filebuf< _CharT, _Traits >::seekpos().


๐Ÿ‘‘ binary โ€” read the note, bestie, please

const openmode std::ios_base::binary [static],  [inherited]

Perform input and output in binary mode (as opposed to text mode). This is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.

Fr though, go read that link. She said "probably not what you think" for a reason โ€” don't assume, it's giving trap ๐Ÿ™ˆ

Referenced by: std::basic_filebuf< _CharT, _Traits >::showmanyc().


๐ŸŽ€ boolalpha โ€” bool but make it letters

const fmtflags std::ios_base::boolalpha [static],  [inherited]

Insert/extract bool in alphabetic rather than numeric format. So true/false instead of 1/0. Way more readable, honestly ๐Ÿ’…

Referenced by: std::boolalpha(), std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), and std::noboolalpha().


๐Ÿฆ‹ cur โ€” seek from where we're at rn

const seekdir std::ios_base::cur [static],  [inherited]

Request a seek relative to the current position within the sequence. Main character position, if you will ๐Ÿ˜Œ

Referenced by: std::basic_filebuf< _CharT, _Traits >::imbue(), std::basic_filebuf< _CharT, _Traits >::overflow(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), std::basic_filebuf< _CharT, _Traits >::seekoff(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff(), std::basic_istream< _CharT, _Traits >::tellg(), and std::basic_ostream< _CharT, _Traits >::tellp().


๐Ÿ”ข dec โ€” decimal, babe

const fmtflags std::ios_base::dec [static],  [inherited]

Converts integer input or generates integer output in decimal base. Base 10 supremacy ๐Ÿ“

Referenced by: std::dec().


๐ŸŒˆ end โ€” seek from the end

const seekdir std::ios_base::end [static],  [inherited]

Request a seek relative to the current end of the sequence. Tail end, literally ๐ŸŒธ

Referenced by: std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff().


โญ eofbit โ€” you hit the end, congrats

const iostate std::ios_base::eofbit [static],  [inherited]

Indicates that an input operation reached the end of an input sequence. That's the whole thing. The end. Literally ๐Ÿซถ

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::time_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get_date(), std::time_get< _CharT, _InIter >::do_get_monthname(), std::time_get< _CharT, _InIter >::do_get_time(), std::time_get< _CharT, _InIter >::do_get_weekday(), std::time_get< _CharT, _InIter >::do_get_year(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< char >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< char >::sync(), std::basic_istream< _CharT, _Traits >::unget(), and std::ws().


๐Ÿ˜ญ failbit โ€” read failed, output failed, vibes failed

const iostate std::ios_base::failbit [static],  [inherited]

Indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters. Both directions can betray you ๐Ÿ’€

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), std::basic_ifstream< _CharT, _Traits >::close(), std::basic_ofstream< _CharT, _Traits >::close(), std::basic_fstream< _CharT, _Traits >::close(), std::num_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get_monthname(), std::time_get< _CharT, _InIter >::do_get_weekday(), std::time_get< _CharT, _InIter >::do_get_year(), std::basic_ios< _CharT, _Traits >::fail(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< char >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ostream< _CharT, _Traits >::seekp(), and std::basic_ostream< _CharT, _Traits >::seekp().


๐ŸŽ€ fixed โ€” fixed-point notation era

const fmtflags std::ios_base::fixed [static],  [inherited]

Generate floating-point output in fixed-point notation. No scientific silliness here โœจ

Referenced by: std::fixed(), and std::hexfloat().


๐Ÿ’œ floatfield โ€” the mask of scientific|fixed

const fmtflags std::ios_base::floatfield [static],  [inherited]

A mask of scientific|fixed. Useful for the 2-arg form of setf. Yes, this is the one that gives you defaultfloat, fixed, hexfloat and scientific โ€” she's the blueprint ๐Ÿ’…

Referenced by: std::defaultfloat(), std::fixed(), std::hexfloat(), and std::scientific().


๐ŸŒŸ goodbit โ€” all is well, bestie

const iostate std::ios_base::goodbit [static],  [inherited]

Indicates all is well. That's it. That's the whole mood. Zero problems, stream is thriving, we love a healthy state ๐Ÿซถโœจ


Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::time_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get_monthname(), std::time_get< _CharT, _InIter >::do_get_weekday(), std::time_get< _CharT, _InIter >::do_get_year(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< char >::get(), std::basic_istream< _CharT, _Traits >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< char >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::sync(), std::basic_istream< _CharT, _Traits >::unget(), and std::ws().

const fmtflags std::ios_base::hex [static], [inherited]

Okay so hex is giving โ€œweโ€™re doing hexadecimal nowโ€ energy. It converts integer input or generates integer output in hexadecimal base. Periodt. ๐Ÿ’…

Referenced by: std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), and std::hex().

const openmode std::ios_base::in [static], [inherited]

in is literally the โ€œopen for inputโ€ vibe. Itโ€™s the default for ifstream and fstream. No cap. ๐Ÿซถ

Referenced by: std::basic_filebuf< _CharT, _Traits >::_M_set_buffer(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos(), std::basic_filebuf< _CharT, _Traits >::showmanyc(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::showmanyc(), std::basic_istream< _CharT, _Traits >::tellg(), std::basic_filebuf< _CharT, _Traits >::underflow(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::underflow(), and std::basic_filebuf< _CharT, _Traits >::xsgetn().

const fmtflags std::ios_base::internal [static], [inherited]

internal adds fill characters at a designated internal point in certain generated output, or itโ€™s identical to right if no such point is designated. Itโ€™s giving โ€œI have a specific spot in mindโ€ energy. โœจ

Referenced by: std::internal().

const fmtflags std::ios_base::left [static], [inherited]

left adds fill characters on the right (final positions) of certain generated output. I.e., the thing you print is flush left. Slay. ๐Ÿ’–

Referenced by: std::num_put< _CharT, _OutIter >::do_put(), and std::left().

const fmtflags std::ios_base::oct [static], [inherited]

oct converts integer input or generates integer output in octal base. Eight is great, bestie. ๐Ÿ™

Referenced by: std::oct().

const openmode std::ios_base::out [static], [inherited]

out is the โ€œopen for outputโ€ icon. Default for ofstream and fstream. You know the vibe. ๐ŸŒˆ

Referenced by: std::basic_filebuf< _CharT, _Traits >::_M_set_buffer(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_filebuf< _CharT, _Traits >::overflow(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::pbackfail(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos(), std::basic_ostream< _CharT, _Traits >::tellp(), and std::basic_filebuf< _CharT, _Traits >::xsputn().

const fmtflags std::ios_base::right [static], [inherited]

right adds fill characters on the left (initial positions) of certain generated output. I.e., the thing you print is flush right. Main character energy. ๐Ÿ‘‘

Referenced by: std::right().

const fmtflags std::ios_base::scientific [static], [inherited]

scientific generates floating-point output in scientific notation. Itโ€™s giving โ€œIโ€™m a scientistโ€ realness. ๐Ÿ”ฌ

Referenced by: std::hexfloat(), and std::scientific().

const fmtflags std::ios_base::showbase [static], [inherited]

showbase generates a prefix indicating the numeric base of generated integer output. So you know itโ€™s hex or octal, periodt. ๐Ÿ’…

Referenced by: std::num_put< _CharT, _OutIter >::do_put(), std::noshowbase(), and std::showbase().

const fmtflags std::ios_base::showpoint [static], [inherited]

showpoint generates a decimal-point character unconditionally in generated floating-point output. Even if itโ€™s not needed? Yes bestie, itโ€™s extra like that. ๐ŸŽ€

Referenced by: std::noshowpoint(), and std::showpoint().

const fmtflags std::ios_base::showpos [static], [inherited]

showpos generates a + sign in non-negative generated numeric output. Positive vibes only. ๐ŸŒธ

Referenced by: std::noshowpos(), and std::showpos().

const fmtflags std::ios_base::skipws [static], [inherited]

skipws skips leading white space before certain input operations. Itโ€™s the โ€œno thanks to your spacesโ€ flag. ๐Ÿ’€

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::noskipws(), std::__detail::operator>>(), and std::skipws().

const openmode std::ios_base::trunc [static], [inherited]

trunc truncates an existing stream when opening. Default for ofstream. Itโ€™s giving โ€œclean slateโ€ energy. No referenced-by for this one, sheโ€™s independent. ๐Ÿฆ‹

const fmtflags std::ios_base::unitbuf [static], [inherited]

unitbuf flushes output after each output operation. Like, every single time. Obsessed with being up-to-date. ๐Ÿ”ฅ

Referenced by: std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::nounitbuf(), and std::unitbuf().

const fmtflags std::ios_base::uppercase [static], [inherited]

uppercase replaces certain lowercase letters with their uppercase equivalents in generated output. GLOW UP. โœจ

Referenced by: std::num_put< _CharT, _OutIter >::do_put(), std::nouppercase(), and std::uppercase().

๐Ÿ‘‘ Author ๐Ÿ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. So you know itโ€™s official. ๐Ÿ’–


๐Ÿ’– thatโ€™s the whole vibe check, bestie! this page came from the libstdc++ source (auto-generated by Doxygen, no cap) and the date is chillinโ€™ in the footer. section 3cxx, you know the drill. stay slay and keep your streams flush! ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from