std::ios_base(3)

πŸ‘‘ std::ios_base(3) β€” Library Functions Manual πŸ‘‘

NAME

std::ios_base β€” the base of the I/O class hierarchy. It's literally the blueprint, bestie. πŸ’…

SYNOPSIS

#include <ios>

Inherited by std::basic_ios< char_type, traits_type >, std::basic_ios< char >, std::basic_ios< wchar_t >, std::basic_ios< _CharT, char_traits< _CharT > >, and std::basic_ios< _CharT, _Traits >.

Classes

  • class failure β€” these are thrown to indicate problems with io. 😭 major red flag, but that's the vibe.

Public Types

  • 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 _Ios_Iostate iostate β€” this is a bitmask type. πŸŽ€
  • typedef _Ios_Openmode openmode β€” this is a bitmask type. πŸŽ€
  • typedef _Ios_Seekdir seekdir β€” this is an enumerated type. πŸ¦‹

Public Member Functions

  • ios_base (const ios_base &)=delete
  • virtual ~ios_base ()
  • const locale & _M_getloc () const β€” locale access. iykyk
  • fmtflags flags () const β€” access to format flags.
  • fmtflags flags (fmtflags __fmtfl) β€” setting new format flags all at once. slay
  • locale getloc () const β€” locale access.
  • locale imbue (const locale &__loc) throw () β€” setting a new locale.
  • long & iword (int __ix) β€” access to integer array.
  • ios_base & operator= (const ios_base &)=delete
  • streamsize precision () const β€” flags access.
  • streamsize precision (streamsize __prec) β€” changing flags.
  • void *& pword (int __ix) β€” access to void pointer array.
  • void register_callback (event_callback __fn, int __index) β€” add the callback __fn with parameter __index.
  • fmtflags setf (fmtflags __fmtfl) β€” setting new format flags.
  • fmtflags setf (fmtflags __fmtfl, fmtflags __mask) β€” setting new format flags.
  • void unsetf (fmtflags __mask) β€” clearing format flags.
  • streamsize width () const β€” flags access.
  • streamsize width (streamsize __wide) β€” changing flags.

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
  • static const fmtflags adjustfield β€” a mask of left|right|internal. Useful for the 2-arg form of setf.
  • static const openmode app β€” seek to end before each write.
  • static const openmode ate β€” open and seek to end immediately after opening.
  • static const iostate badbit β€” indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file).
  • 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). 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 rather than 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. we love that ✨
  • 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 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 }

Protected Member Functions

  • void _M_call_callbacks (event __ev) throw ()
  • void _M_dispose_callbacks (void) throw ()
  • _Words & _M_grow_words (int __index, bool __iword)
  • void _M_init () throw ()
  • void _M_move (ios_base &) noexcept
  • void _M_swap (ios_base &__rhs) noexcept

Protected Attributes

  • _Callback_list * _M_callbacks
  • iostate _M_exception
  • fmtflags _M_flags
  • locale _M_ios_locale
  • _Words _M_local_word [_S_local_word_size]
  • streamsize _M_precision
  • iostate _M_streambuf_state
  • streamsize _M_width
  • _Words * _M_word
  • int _M_word_size
  • _Words _M_word_zero

Detailed Description

The base of the I/O class hierarchy. This class defines everything that can be defined about I/O that does not depend on the type of characters being input or output. Most people will only see ios_base when they need to specify the full name of the various I/O flags (e.g., the openmodes). No cap. πŸ’…

Member Typedef Documentation

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

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(). main character energy ✨

typedef _Ios_Fmtflags std::ios_base::fmtflags

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

typedef _Ios_Iostate std::ios_base::iostate

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

typedef _Ios_Openmode std::ios_base::openmode

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

typedef _Ios_Seekdir std::ios_base::seekdir

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

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

virtual std::ios_base::~ios_base () [virtual]

Invokes each callback with erase_event. Destroys local storage.

Note that the ios_base object for the standard streams never gets destroyed. As a result, any callbacks registered with the standard streams will not get invoked with erase_event (unless copyfmt is used).

✨ MEMBER FUNCTION DOCUMENTATION ✨

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

okay so this one is the locale access hack β€” it hands you a reference to the current locale. Like getloc above, but returns a reference instead of generating a copy. No cap, it's the glow-up version that skips the copy.

Referenced by std::money_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::time_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().


fmtflags std::ios_base::flags () const [inline], [nodiscard] πŸ’…

Access to format flags, bestie. It returns the format control flags for both input and output. It's giving "let me peek at the whole vibe".

Referenced by 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::chrono::operator<<(), std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<, std::__detail::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>.


fmtflags std::ios_base::flags (fmtflags __fmtfl) [inline] πŸ”₯

Setting new format flags all at once. It's the "I'm changing everything" button.

  • Parameters
    • __fmtfl β€” The new flags to set.
  • Returns
    • The previous format control flags.

This function overwrites all the format flags with __fmtfl. So yeah, it's a full reset, no leftovers.


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

Locale access again, but this time it gives you 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. So it's the "safe copy" bestie.

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


locale std::ios_base::imbue (const locale & __loc) πŸ¦‹

Setting a new locale. It's a whole vibe shift.

  • Parameters
    • __loc β€” The new locale.
  • Returns
    • The previous locale.

Sets the new locale for this stream, and then invokes each callback with imbue_event. Callbacks are literally getting the memo.

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


long & std::ios_base::iword (int __ix) [inline] πŸ’–

Access to integer array. It's the secret integer stash.

  • 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.

Bestie, do NOT hold onto that reference. The array can move. It's giving "ghosted by reallocation".

References iword().

Referenced by iword().


streamsize std::ios_base::precision () const [inline], [nodiscard] πŸŽ€

Flags access. It returns the precision to generate on certain output operations. Be careful if you try to give a definition of precision here; see DR 189. Noted, bestie. DR 189 is watching.

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


streamsize std::ios_base::precision (streamsize __prec) [inline] ✨

Changing flags. Precision but make it a setter.

  • Parameters
    • __prec β€” The new precision value.
  • Returns
    • The previous value of precision().

void *& std::ios_base::pword (int __ix) [inline] 🌸

Access to void pointer array. It's the pointer stash, no cap.

  • Parameters
    • __ix β€” Index into the array.
  • Returns
    • A reference to a void* associated with the index.

The pword function provides access to an array of pointers that can be used for any purpose. The array grows as required to hold the supplied index. All pointers 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.

Same warning, bestie: the array can grow, so don't hold that reference like it's your emotional support pointer.

void std::ios_base::register_callback (event_callback __fn, int __index) πŸ””

Add the callback __fn with parameter __index. It's the "call me maybe" of streams.

  • 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. So first come, first served. No cutting the line.


fmtflags std::ios_base::setf (fmtflags __fmtfl) [inline] πŸ’…

Setting new format flags. It's the "add more, keep the old" move.

  • 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. So it's additive, not a reset. Iconic.

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


fmtflags std::ios_base::setf (fmtflags __fmtfl, fmtflags __mask) [inline] πŸ”₯

Setting new format flags, but with a mask. It's the "clear then set" combo.

  • 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. So you wipe the mask area, then drop in the new bits.


bool std::ios_base::sync_with_stdio (bool __sync = true) [static] 🌈

Interaction with the standard C I/O objects. It's the "are C and C++ talking?" button.

  • 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


void std::ios_base::unsetf (fmtflags __mask) [inline] 🧹

Clearing format flags. It's the "cancel that" button.

  • Parameters
    • __mask β€” The flags to unset.

This function clears __mask in the format flags.


streamsize std::ios_base::width () const [inline], [nodiscard] πŸŽ€

Flags access. It returns the minimum field width to generate on output operations. Minimum field width refers to the number of characters. So it's how wide your output is gonna be, bestie.

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


streamsize std::ios_base::width (streamsize __wide) [inline] ✨

Changing flags. Width but make it a setter.

  • Parameters
    • __wide β€” The new width value.
  • Returns
    • The previous value of width().

int std::ios_base::xalloc () [static] πŸ’–

Access to unique indices. It's the "give me a fresh number" function.

  • Returns
    • An integer different from all previous calls.

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.

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.


πŸŽ€ MEMBER DATA DOCUMENTATION πŸŽ€

const fmtflags std::ios_base::adjustfield [static] πŸ’…

A mask of left|right|internal. Useful for the 2-arg form of setf.

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


const openmode std::ios_base::app [static] πŸ“Ž

Seek to end before each write. Append mode, bestie.

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


const openmode std::ios_base::ate [static] πŸ¦‹

Open and seek to end immediately after opening. It's "at end" but only at the start.

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


const iostate std::ios_base::badbit [static] πŸ’€

Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file). It's the "this stream is broken" flag.

Referenced by std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ios< _CharT, _Traits >::clear(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_iostream< char_type, traits_type >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_iostream< char_type, traits_type >::operator<<(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, char_traits< _CharT > >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::sync(), std::basic_istream< _CharT, _Traits >::tellg(), std::basic_istream< _CharT, _Traits >::unget(), and std::ws().


const fmtflags std::ios_base::basefield [static] πŸ’…

A mask of dec|oct|hex. Useful for the 2-arg form of setf.

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


const seekdir std::ios_base::beg [static] 🌸

Request a seek relative to the beginning of the stream. It's the "rewind to start" vibe.

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


const openmode std::ios_base::binary [static] πŸ’Ύ

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. So read the docs, bestie β€” it's giving "not what you think".

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


const fmtflags std::ios_base::boolalpha [static] πŸŽ€

Insert/extract bool in alphabetic rather than numeric format. So true/false instead of 1/0. Iconic.

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


const seekdir std::ios_base::cur [static] πŸ¦‹

Request a seek relative to the current position within the sequence. It's the "from where I am right now" seek.

Carrying straight on from the last entry's Referenced by roll call β€” the rest of that list, no interruptions, bestie:

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().


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

Converts integer input or generates integer output in decimal base. ✨ The classic. Ten fingers, ten digits, the vibe we were all raised on fr fr.

Referenced by std::dec(), std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<, and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>.


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

Requests a seek relative to the current end of the sequence πŸŽ€ β€” like, "put me at the back, bestie." Not the start, not where you are, the end end.

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


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

Indicates that an input operation reached the end of an input sequence πŸ’€ β€” you read everything there was to read, nothing left, the stream said "that's all folks."

Referenced by 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(), 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_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::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, char_traits< _CharT > >::peek(), 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< _CharT, char_traits< _CharT > >::seekg(), std::basic_istream< _CharT, _Traits >::unget(), std::basic_istream< _CharT, char_traits< _CharT > >::unget(), and std::ws().


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

Indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters. 😭 Like when you asked for a number and got vibes instead. It's giving "we tried, it didn't hit."

Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), std::basic_fstream< char >::close(), std::basic_ifstream< char >::close(), std::basic_ofstream< char >::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_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_fstream< char >::open(), std::basic_fstream< char >::open(), std::basic_ifstream< char >::open(), std::basic_ifstream< char >::open(), std::basic_ofstream< char >::open(), std::basic_ofstream< char >::open(), std::operator<<(), std::basic_iostream< char_type, traits_type >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::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().


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

Generates floating-point output in fixed-point notation πŸ“ β€” decimals sitting exactly where you left them, no sneaky exponent energy.

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


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

A mask of scientific|fixed. Useful for the 2-arg form of setf. πŸ‘‘

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


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

Indicates all is well 🫢✨ Everything's fine, nobody's stressed, the stream is thriving, we love to see it.

Referenced by std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::num_get< _CharT, _InIter >::do_get(), std::time_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_iostream< char_type, traits_type >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::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_istream< _CharT, _Traits >::ignore(), std::basic_iostream< char_type, traits_type >::operator<<(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_iostream< char_type, traits_type >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::peek(), 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_istream< _CharT, _Traits >::sync(), std::basic_istream< _CharT, _Traits >::unget(), and std::ws().


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

Converts integer input or generates integer output in hexadecimal base πŸ’… β€” base sixteen, the cool kid base, 0x and all.

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]

Open for input. Default for ifstream and fstream. 🌈

Referenced by std::basic_fstream< char >::basic_fstream(), std::basic_fstream< char >::basic_fstream(), std::basic_fstream< char >::basic_fstream(), std::basic_ifstream< char >::basic_ifstream(), std::basic_ifstream< char >::basic_ifstream(), std::basic_ifstream< char >::basic_ifstream(), std::basic_istringstream< char >::basic_istringstream(), std::basic_stringbuf< char >::basic_stringbuf(), std::basic_stringstream< char >::basic_stringstream(), std::basic_filebuf< char_type, traits_type >::_M_set_buffer(), std::basic_fstream< char >::open(), std::basic_fstream< char >::open(), std::basic_fstream< char >::open(), std::basic_ifstream< char >::open(), std::basic_ifstream< char >::open(), std::basic_ifstream< char >::open(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), std::basic_streambuf< char_type, traits_type >::pubseekoff(), std::basic_streambuf< char_type, traits_type >::pubseekpos(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_streambuf< char_type, traits_type >::seekoff(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff(), std::basic_stringbuf< char >::seekoff(), std::basic_streambuf< char_type, traits_type >::seekpos(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos(), std::basic_stringbuf< char >::seekpos(), std::basic_filebuf< _CharT, _Traits >::showmanyc(), std::basic_stringbuf< char >::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]

Adds fill characters at a designated internal point in certain generated output, or identical to right if no such point is designated. 🧚

Referenced by std::internal().


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

Adds fill characters on the right (final positions)</c> of certain generated output. (I.e., the thing you print is flush left.). ✨

Referenced by std::num_put< _CharT, _OutIter >::do_put(), std::left(), and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<.


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

Converts integer input or generates integer output in octal base πŸŽ€ β€” base eight, the underrated icon.

Referenced by std::oct().


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

Open for output. Default for ofstream and fstream. 🌈

Referenced by std::basic_fstream< char >::basic_fstream(), std::basic_fstream< char >::basic_fstream(), std::basic_fstream< char >::basic_fstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ostringstream< char >::basic_ostringstream(), std::basic_stringbuf< char >::basic_stringbuf(), std::basic_stringstream< char >::basic_stringstream(), std::basic_filebuf< char_type, traits_type >::_M_set_buffer(), std::basic_fstream< char >::open(), std::basic_fstream< char >::open(), std::basic_fstream< char >::open(), std::basic_ofstream< char >::open(), std::basic_ofstream< char >::open(), std::basic_ofstream< char >::open(), std::basic_filebuf< _CharT, _Traits >::overflow(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::pbackfail(), std::basic_streambuf< char_type, traits_type >::pubseekoff(), std::basic_streambuf< char_type, traits_type >::pubseekpos(), std::basic_streambuf< char_type, traits_type >::seekoff(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff(), std::basic_stringbuf< char >::seekoff(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_streambuf< char_type, traits_type >::seekpos(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos(), std::basic_stringbuf< char >::seekpos(), std::basic_ostream< _CharT, _Traits >::tellp(), and std::basic_filebuf< _CharT, _Traits >::xsputn().


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

Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.). πŸ’…

Referenced by std::right().


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

Generates floating-point output in scientific notation πŸ”₯ β€” big numbers doing e+ things, very main character.

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


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

Generates a prefix indicating the numeric base of generated integer output. πŸ‘‘ (hi 0x, hi 0, hi 0b-adjacent behaviour, we see you)

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


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

Generates a decimal-point character unconditionally in generated floating-point output. πŸ“ No hiding the dot, bestie β€” it shows up whether or not it strictly had to.


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

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

Okay so this one is iconic: it generates a + sign in non-negative generated numeric output. No cap, it's giving positivity. ✨

Referenced by std::noshowpos(), and std::showpos(). πŸ’–

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

Skips leading white space before certain input operations. It's lowkey the "ignore the awkward silence" flag. πŸ™ˆ

Referenced by std::noskipws(), std::__detail::operator>>(), std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>, and std::skipws(). πŸ‘‘

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

Truncate an existing stream when opening. Default for ofstream. That's a whole mood: it says "we're starting fresh, bestie." πŸ’…

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

Flushes output after each output operation. It's literally the "no secrets, keep it real" flag. πŸ¦‹

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

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

Replaces certain lowercase letters with their uppercase equivalents in generated output. It's giving main character energy, all caps when the vibe calls. πŸ‘‘

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. πŸ’–


And that's a wrap on this part, bestie! The footer says this page is from libstdc++ and it's the std::ios_base(3) page β€” date vibes: timeless, periodt. πŸ’…πŸŒˆ

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms