std::ios_base(3cxx)

🌸 NAME 🌸

std::ios_base β€” the base of the I/O class hierarchy. (yes bestie, this is the std::ios_base(3cxx) page, we're doing the whole thing πŸ’…)


✨ SYNOPSIS ✨

#include <ios>

Inherited by std::basic_ios< char, _Traits >, and std::basic_ios< _CharT, _Traits >.

πŸŽ€ Classes πŸŽ€

  • class failure β€” these are thrown to indicate problems with io. (rude of them, honestly, but okay.)

πŸ¦‹ 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 β€” no copying, periodt. it's literally deleted.
  • virtual ~ios_base () β€” the destructor, doing destructor things.
  • const locale & _M_getloc () const β€” locale access.
  • fmtflags flags () const β€” access to format flags.
  • fmtflags flags (fmtflags __fmtfl) β€” setting new format flags all at once.
  • 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 β€” also deleted, no assignment for u either. πŸ™…β€β™€οΈ
  • 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 (the two-arg version, she's got range).
  • 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 β€” yeah, that's the name, don't come for me.
  • 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. (the good one, the icon ✨)
  • 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 } β€” it's an anonymous enum, mysterious queen.

🧚 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 πŸ’œ

okay so, the base of the I/O class hierarchy. say it with me bestie.

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 ever see ios_base when they need to specify the full name of the various I/O flags (e.g., the openmodes). so like, you'll bump into her at a party but you won't really talk to her, yk? iykyk.


🌸 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 (the receipts):

  • __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(). she's booked and busy.

⭐ 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(). three moods, three events, we love a consistent queen.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

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

invokes each callback with erase_event. destroys local storage.

⚠️ note: 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). literally never, bestie. count your blessings.

okay that's the whole structure dump, but bestie we're only like a third of the way through β€” the member function deep-dives are next and they are so much. keep scrolling πŸ‘€πŸ«Ά

πŸ’– Member Function Documentation πŸ’–

okay bestie, this is the big one β€” every single member function, no skips, no "you get the idea" πŸ’€ grab a snack πŸ“ and let's go.


✨ _M_getloc() β€” locale access, but the reference version

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

Returns: a reference to the current locale.

It's literally like getloc above, except it hands you back a reference instead of generating a whole copy. lowkey efficient, we love to see it πŸ’…

  • Referenced by: 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().

πŸŽ€ flags() β€” peeking at your format flags (const version)

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

Returns: the format control flags for both input and output. yes bestie, both. one big flag pile 🫢

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

πŸ”₯ flags(fmtflags) β€” setting ALL the flags at once

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

Parameters:

  • __fmtfl β€” the new flags to set.

Returns: the previous format control flags.

Heads up: this function overwrites all the format flags with __fmtfl. like, all of them. it does not ask. it does not negotiate. periodt πŸ’€


🌸 getloc() β€” locale access, the copy edition

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

Returns: a copy of the current locale.

The way this works: if imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std::locale(), the global C++ locale. iykyk 🧚

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

πŸ¦‹ imbue() β€” setting a brand new locale

locale std::ios_base::imbue (const locale & __loc)

Parameters:

  • __loc β€” the new locale.

Returns: the previous locale.

Sets the new locale for this stream, and then β€” plot twist β€” invokes each callback with imbue_event. yes, the callbacks get notified. they're in the group chat too πŸ‘‘

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

πŸ’œ iword() β€” the integer stash array

long & std::ios_base::iword (int __ix) [inline]

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, and all integers in the array are initialized to 0. slay, free storage ✨

okay but two massive caveats bestie, don't skip these: - The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. - Since the array can grow dynamically, it is not safe to hold onto the reference. 😭 it can get yanked out from under you.

⭐ precision() β€” flags access, precision edition

streamsize std::ios_base::precision () const [inline]

Returns: the precision to generate on certain output operations.

Be careful if you try to give a definition of precision here; see DR 189. fr fr, that's a known thing, not me being dramatic.
  • Referenced by: std::basic_ios< _CharT, _Traits >::copyfmt(), and std::chrono::operator<<().

πŸ’… precision(streamsize) β€” changing the precision

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

Parameters:

  • __prec β€” the new precision value.

Returns: the previous value of precision().


πŸ“ pword() β€” the void-pointer stash array

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

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, and all pointers in the array are initialized to 0. iconic, honestly 🫢

same two warnings as iword, no cap: - The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. - Since the array can grow dynamically, it is not safe to hold onto the reference. πŸ™ˆ

πŸŽ€ register_callback() β€” adding a callback

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

Add the callback __fn with parameter __index.

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. And if there are multiple callbacks, they are invoked in the order they were registered. first come, first called, literally πŸ’œ


🌈 setf(fmtflags) β€” adding more flags

fmtflags std::ios_base::setf (fmtflags __fmtfl) [inline]

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. nobody gets unset here, we're only adding πŸ’…

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

🧚 setf(fmtflags, fmtflags) β€” the masked version

fmtflags std::ios_base::setf (fmtflags __fmtfl, fmtflags __mask) [inline]

Parameters:

  • __fmtfl β€” additional flags to set.
  • __mask β€” the flags mask for __fmtfl.

Returns: the previous format control flags.

The way this one works: it clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base::adjustfield ✨


πŸ‘‘ sync_with_stdio() β€” C I/O meets C++ I/O

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

Interaction with the standard C I/O objects.

Parameters:

  • __sync β€” whether to synchronize or not.

Returns: true if the standard streams were previously synchronized.

read this carefully bestie: 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.


πŸ”₯ unsetf() β€” clearing format flags

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

Parameters:

  • __mask β€” the flags to unset.

This function clears __mask in the format flags. simple, clean, no notes πŸ’…


🌸 width() β€” flags access, width edition

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

Returns: the minimum field width to generate on output operations.

Minimum field width refers to the number of characters. yes, characters, not vibes 😭

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

πŸ’œ width(streamsize) β€” changing the width

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

Parameters:

  • __wide β€” the new width value.

Returns: the previous value of width().


⭐ xalloc() β€” the index dispenser

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

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. we stan a reliable icon πŸ‘‘


πŸ¦‹ Member Data Documentation πŸ¦‹

now for all the static constants, aka the lore drop πŸ’€


πŸŽ€ adjustfield

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

A mask of left|right|internal. Useful for the 2-arg form of setf. iykyk πŸ’…

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

✨ app

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

Seek to end before each write. every single time, no skipping 🫢

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

🌸 ate

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

Open and seek to end immediately after opening. like, the moment it's open, boom, end of file. iconic entrance πŸ’…

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

πŸ’€ badbit

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). this one's the serious one, bestie 😭

  • 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

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

A mask of dec|oct|hex. Useful for the 2-arg form of setf. the number-base trio πŸŽ€

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

🧚 beg

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

Request a seek relative to the beginning of the stream. start of the line, literally ✨

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

πŸ¦‹ binary

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. bestie please read the link before you fight me on this 😭
  • Referenced by: std::basic_filebuf< _CharT, _Traits >::showmanyc().

⭐ boolalpha

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

Insert/extract bool in alphabetic rather than numeric format. so true/false instead of 1/0, we love a glow-up πŸ’…

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

🌈 cur

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

Request a seek relative to the current position within the sequence. you are here, we stay here 🫢

  • 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

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

Converts integer input or generates integer output in decimal base. base 10 supremacy, no cap πŸ’…

  • const seekdir std::ios_base::end [static] β€” want to seek relative to wherever the sequence currently ends? this is the vibe check for that. πŸŽ€
    • Referenced by std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff().
  • const iostate std::ios_base::eofbit [static] β€” bestie, this one means an input operation hit the end of an input sequence. you ran out of stream. that's it, that's the whole mood. 😭
    • 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().
  • const iostate std::ios_base::failbit [static] β€” the ✨disappointment✨ flag. it means an input operation failed to read the characters it expected, or an output operation failed to generate the characters you wanted. either way, not slay. πŸ’€
    • 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().
  • const fmtflags std::ios_base::fixed [static] β€” makes floating-point output come out in good ol' fixed-point notation. no fancy exponent business. πŸŽ€
    • Referenced by std::fixed(), and std::hexfloat().
  • const fmtflags std::ios_base::floatfield [static] β€” it's a mask of scientific|fixed. lowkey the MVP when you're using 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." that's the whole entry. everything is fine, we're thriving, no notes. 🌸
    • 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] β€” converts integer input or generates integer output in hexadecimal base. base 16 core, honestly. πŸ”₯
    • 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, bestie. it's the default for ifstream and fstream. πŸ¦‹
    • 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] β€” sticks fill characters at a designated internal point in certain generated output. orrrr it behaves identical to right if no such point is designated. not me calling that a glow-up with a backup plan. πŸ™ˆ
    • Referenced by std::internal().
  • const fmtflags std::ios_base::left [static] β€” adds fill characters on the right (the final positions) of certain generated output. i.e., the thing you print is flush left. icon behavior. πŸ’…
    • Referenced by std::num_put< _CharT, _OutIter >::do_put(), and std::left().
  • const fmtflags std::ios_base::oct [static] β€” converts integer input or generates integer output in octal base. base 8, underrated fr fr. πŸ“
    • Referenced by std::oct().
  • const openmode std::ios_base::out [static] β€” open for output. default for ofstream and fstream. say it with me: output mode main character energy. πŸ‘‘
    • 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] β€” adds fill characters on the left (the initial positions) of certain generated output. i.e., the thing you print is flush right. the mirror twin of left, and yes she ate. ✨
    • Referenced by std::right().
  • const fmtflags std::ios_base::scientific [static] β€” generates floating-point output in scientific notation. big numbers, tiny notation, very demure. 🧚
    • Referenced by std::hexfloat(), and std::scientific().
  • const fmtflags std::ios_base::showbase [static] β€” generates a prefix that shows off the numeric base of your generated integer output. like a little name tag for your number. πŸŽ€
    • 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 conditions, no maybes, she's showing up. periodt. πŸ’–
    • Referenced by std::noshowpoint(), and std::showpoint().
  • const fmtflags std::ios_base::showpos [static] β€” generates a + sign in non-negative generated numeric output. positivity only, bestie. 🌈
    • Referenced by std::noshowpos(), and std::showpos().
  • const fmtflags std::ios_base::skipws [static] β€” skips leading white space before certain input operations. it's giving "ignore the noise before the real content." 🌸
    • Referenced by std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::noskipws(), std::__detail::operator>>(), and std::skipws().
  • const openmode std::ios_base::trunc [static] β€” truncate an existing stream when opening. default for ofstream. ⚠️ note that this one does wipe what was there, so don't come for me when your file is gone. πŸ’€
  • const fmtflags std::ios_base::unitbuf [static] β€” flushes output after each output operation. hyper-vigilant bestie who sends every message the second she types it. πŸ”₯
    • 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. SHE'S YELLING (respectfully). πŸ’œ
    • 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 no, a human girlie did not hand-write this, the robots did, and honestly they ate. 🫢


okay that's the whole page, bestie, you made it to the end of part 3 πŸŽ‰ credit where it's due: this little masterpiece is from libstdc++, it's the std::ios_base(3cxx) page, and it was auto-generated straight from the source code β€” go drink some water and then go read your stream's state flags, ily. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from