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 &)=deletevirtual ~ios_base ()const locale & _M_getloc () constβ locale access. iykykfmtflags flags () constβ access to format flags.fmtflags flags (fmtflags __fmtfl)β setting new format flags all at once. slaylocale 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 &)=deletestreamsize 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__fnwith 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 __noreplacestatic const fmtflags adjustfieldβ a mask ofleft|right|internal. Useful for the 2-arg form ofsetf.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 ofdec|oct|hex. Useful for the 2-arg form ofsetf.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; seehttps://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.static const fmtflags boolalphaβ insert/extractboolin 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 ofscientific|fixed. Useful for the 2-arg form ofsetf.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 forifstreamandfstream.static const fmtflags internalβ adds fill characters at a designated internal point in certain generated output, or identical torightif 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 forofstreamandfstream.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 forofstream.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 &) noexceptvoid _M_swap (ios_base &__rhs) noexcept
Protected Attributes
_Callback_list * _M_callbacksiostate _M_exceptionfmtflags _M_flagslocale _M_ios_locale_Words _M_local_word [_S_local_word_size]streamsize _M_precisioniostate _M_streambuf_statestreamsize _M_width_Words * _M_wordint _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 theeventenum.__bβ reference to theios_baseobject.__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:
boolalphadecfixedhexinternalleftoctrightscientificshowbaseshowpointshowposskipwsunitbufuppercaseadjustfieldbasefieldfloatfield
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:
badbiteofbitfailbitgoodbit
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:
appatebinaryinouttrunc
typedef _Ios_Seekdir std::ios_base::seekdir
This is an enumerated type. _Ios_Seekdir is implementation-defined. Defined values of type seekdir are:
begcur, equivalent toSEEK_CURin the C standard library.end, equivalent toSEEK_ENDin 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 theios_baseobject for the standard streams never gets destroyed. As a result, any callbacks registered with the standard streams will not get invoked witherase_event(unlesscopyfmtis 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().
- The previous value of
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.
- A reference to a
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 forfmtfl.
- 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().
- The previous value of
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