STD::WISTREAM(3cxx)

๐ŸŒˆ std::basic_istream< _CharT, _Traits > ๐ŸŒˆ

hey bestie ๐Ÿ’– this is the (3cxx) manual page for std::basic_istream< _CharT, _Traits > โ€” part 1, and we're gonna get through it together, no cap โœจ


๐Ÿ’– NAME ๐Ÿ’–

std::basic_istream< _CharT, _Traits > โ€” Template class basic_istream. that's the whole name section, periodt ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <istream>

Inherits std::basic_ios< _CharT, _Traits >.

Inherited by std::basic_iostream< char >, std::basic_ifstream< _CharT,
_Traits >, std::basic_iostream< _CharT, _Traits >, and
std::basic_istringstream< _CharT, _Traits, _Alloc >.

๐ŸŽ€ Classes ๐ŸŽ€

  • class sentry โ€” Performs setup work for input streams. literally the little pre-show helper for input streams ๐Ÿซถ

๐Ÿฆ‹ Public Types ๐Ÿฆ‹

  • typedef ctype< _CharT > __ctype_type
  • typedef basic_ios< _CharT, _Traits > __ios_type
  • typedef basic_istream< _CharT, _Traits > __istream_type
  • typedef num_get< _CharT, istreambuf_iterator< _CharT, _Traits > > __num_get_type
  • typedef basic_streambuf< _CharT, _Traits > __streambuf_type
  • typedef _CharT char_type
  • enum event { erase_event, imbue_event, copyfmt_event } โ€” The set of events that may be passed to an event callback. event girlies, this is your list ๐Ÿ’ซ
  • typedef void(* event_callback) (event __e, ios_base &__b, int __i) โ€” The type of an event callback function.
  • typedef _Ios_Fmtflags fmtflags โ€” This is a bitmask type.
  • typedef _Traits::int_type int_type
  • typedef _Ios_Iostate iostate โ€” This is a bitmask type.
  • typedef _Traits::off_type off_type
  • typedef _Ios_Openmode openmode โ€” This is a bitmask type.
  • typedef _Traits::pos_type pos_type
  • typedef _Ios_Seekdir seekdir โ€” This is an enumerated type.
  • typedef _Traits traits_type
  • typedef num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > __num_put_type

๐Ÿ‘‘ Public Member Functions ๐Ÿ‘‘

  • basic_istream (__streambuf_type *__sb) โ€” Base constructor. the classic "gimme a streambuf and let's go" move ๐Ÿ’…
  • virtual ~basic_istream () โ€” Base destructor.
  • template<typename _ValueT > basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v) โ€” the extract helper signature, exactly as the page says it.
  • const locale & _M_getloc () const โ€” Locale access.
  • void _M_setstate (iostate __state) โ€” state-setting helper signature, no extra description attached on this page.
  • bool bad () const โ€” Fast error checking. is the stream in a bad-bad mood? ๐Ÿ˜ญ
  • void clear (iostate __state=goodbit) โ€” [Re]sets the error state.
  • basic_ios & copyfmt (const basic_ios &__rhs) โ€” Copies fields of __rhs into this.
  • bool eof () const โ€” Fast error checking. specifically the end-of-file check, bestie.
  • iostate exceptions () const โ€” Throwing exceptions on errors.
  • void exceptions (iostate __except) โ€” Throwing exceptions on errors.
  • bool fail () const โ€” Fast error checking.
  • char_type fill () const โ€” Retrieves the empty character.
  • char_type fill (char_type __ch) โ€” Sets a new empty character.
  • fmtflags flags () const โ€” Access to format flags.
  • fmtflags flags (fmtflags __fmtfl) โ€” Setting new format flags all at once.
  • streamsize gcount () const โ€” Character counting.
  • basic_istream< char > & getline (char_type *__s, streamsize __n, char_type __delim) โ€” Explicit specialization declarations, defined in src/istream.cc.
  • basic_istream< wchar_t > & getline (char_type *__s, streamsize __n, char_type __delim) โ€” the wchar_t specialization declaration.
  • locale getloc () const โ€” Locale access.
  • bool good () const โ€” Fast error checking. the "everything's chill" check โœจ
  • basic_istream< char > & ignore (streamsize __n) โ€” the char specialization declaration for ignoring input.
  • basic_istream< wchar_t > & ignore (streamsize __n) โ€” the wchar_t specialization declaration for ignoring input.
  • basic_istream< char > & ignore (streamsize __n, int_type __delim) โ€” the char specialization declaration with a delimiter.
  • basic_istream< wchar_t > & ignore (streamsize __n, int_type __delim) โ€” the wchar_t specialization declaration with a delimiter.
  • locale imbue (const locale &__loc) โ€” Moves to a new locale.
  • long & iword (int __ix) โ€” Access to integer array.
  • char narrow (char_type __c, char __dfault) const โ€” Squeezes characters.
  • __istream_type & operator>> (__streambuf_type *__sb) โ€” Extracting into another streambuf.
  • __istream_type & operator>> (void *&__p) โ€” Basic arithmetic extractors.
  • streamsize precision () const โ€” Flags access.
  • streamsize precision (streamsize __prec) โ€” Changing flags.
  • void *& pword (int __ix) โ€” Access to void pointer array.
  • basic_streambuf< _CharT, _Traits > * rdbuf () const โ€” Accessing the underlying buffer.
  • basic_streambuf< _CharT, _Traits > * rdbuf (basic_streambuf< _CharT, _Traits > *__sb) โ€” Changing the underlying buffer.
  • iostate rdstate () const โ€” Returns the error state of the stream buffer.
  • void register_callback (event_callback __fn, int __index) โ€” Add the callback __fn with parameter __index.
  • fmtflags setf (fmtflags __fmtfl) โ€” Setting new format flags.
  • fmtflags setf (fmtflags __fmtfl, fmtflags __mask) โ€” Setting new format flags.
  • void setstate (iostate __state) โ€” Sets additional flags in the error state.
  • basic_ostream< _CharT, _Traits > * tie () const โ€” Fetches the current tied stream.
  • basic_ostream< _CharT, _Traits > * tie (basic_ostream< _CharT, _Traits > *__tiestr) โ€” Ties this stream to an output stream.
  • void unsetf (fmtflags __mask) โ€” Clearing format flags.
  • char_type widen (char __c) const โ€” Widens characters.
  • streamsize width () const โ€” Flags access.
  • streamsize width (streamsize __wide) โ€” Changing flags.
  • __istream_type & operator>> (__istream_type &(*__pf)(__istream_type &)) โ€” Interface for manipulators.
  • __istream_type & operator>> (__ios_type &(*__pf)(__ios_type &)) โ€” Interface for manipulators.
  • __istream_type & operator>> (ios_base &(*__pf)(ios_base &)) โ€” Interface for manipulators.

๐Ÿ”ฅ Extractors ๐Ÿ”ฅ

All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.

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

If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions mask.

โš ๏ธ bestie, that exception note is important: badbit gets set, but that does not mean an ios_base::failure gets thrown there. the original exception comes back if badbit is set in the exceptions mask. no cap.
  • __istream_type & operator>> (bool &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (short &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (unsigned short &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (int &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (unsigned int &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (long &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (unsigned long &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (long long &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (unsigned long long &__n) โ€” Integer arithmetic extractors.
  • __istream_type & operator>> (float &__f) โ€” Floating point arithmetic extractors.
  • __istream_type & operator>> (double &__f) โ€” Floating point arithmetic extractors.
  • __istream_type & operator>> (long double &__f) โ€” Floating point arithmetic extractors.

๐ŸŒŠ Unformatted Input Functions ๐ŸŒŠ

All the unformatted input functions have some common behavior. Each starts by constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to true. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.

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

The number of characters extracted is stored for later retrieval by gcount().

If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions mask.

  • int_type get () โ€” Simple extraction.
  • __istream_type & get (char_type &__c) โ€” Simple extraction.
  • __istream_type & get (char_type *__s, streamsize __n, char_type __delim) โ€” Simple multiple-character extraction.
  • __istream_type & get (char_type *__s, streamsize __n) โ€” Simple multiple-character extraction.
  • __istream_type & get (__streambuf_type &__sb, char_type __delim) โ€” Extraction into another streambuf.
  • __istream_type & get (__streambuf_type &__sb) โ€” Extraction into another streambuf.
  • __istream_type & getline (char_type *__s, streamsize __n, char_type __delim) โ€” String extraction.
  • __istream_type & getline (char_type *__s, streamsize __n) โ€” String extraction.
  • __istream_type & ignore (streamsize __n, int_type __delim) โ€” Discarding characters.
  • __istream_type & ignore (streamsize __n) โ€” Simple extraction.
  • __istream_type & ignore () โ€” Simple extraction.
  • int_type peek () โ€” Looking ahead in the stream.
  • __istream_type & read (char_type *__s, streamsize __n) โ€” Extraction without delimiters.
  • streamsize readsome (char_type *__s, streamsize __n) โ€” Extraction until the buffer is exhausted, but no more.
  • __istream_type & putback (char_type __c) โ€” Unextracting a single character.
  • __istream_type & unget () โ€” Unextracting the previous character.
  • int sync () โ€” Synchronizing the stream buffer.
  • pos_type tellg () โ€” Getting the current read position.
  • __istream_type & seekg (pos_type) โ€” Changing the current read position.
  • __istream_type & seekg (off_type, ios_base::seekdir) โ€” Changing the current read position.
  • operator bool () const โ€” The quick-and-easy status check.
  • bool operator! () const โ€” The quick-and-easy status check.

๐ŸŒŸ Static Public Member Functions ๐ŸŒŸ

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

โœจ Static Public Attributes โœจ

Okay bestie, these are the shared, class-wide constants of <ios_base> โ€” every single one of them is static const, so nobody in the group chat gets to edit them. Periodt. ๐Ÿ’…

  • static const openmode __noreplace โ€” literally no blurb in the docs for this one, she's mysterious, we move ๐ŸŽ€
  • 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 vibe check passed, we love to see it
  • 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 } โ€” that's the whole thing. No description, no notes, just vibes and an internal word-size constant. ๐ŸŒธ

๐Ÿ’œ Protected Member Functions ๐Ÿ’œ

  • basic_istream (basic_istream &&__rhs)
  • basic_istream (const basic_istream &)=delete) โ€” nope, copying is deleted, do not attempt ๐Ÿšซ
  • void _M_cache_locale (const locale &__loc)
  • void _M_call_callbacks (event __ev) throw ()
  • void _M_dispose_callbacks (void) throw ()
  • template<typename _ValueT > __istream_type & _M_extract (_ValueT &__v)
  • _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
  • void init (basic_streambuf< _CharT, _Traits > *__sb) โ€” all setup is performed here. that's it, that's the whole job description โœจ
  • void move (basic_ios &&__rhs)
  • void move (basic_ios &__rhs)
  • basic_istream & operator= (basic_istream &&__rhs)
  • basic_istream & operator= (const basic_istream &)=delete โ€” again: copy assignment is deleted, bestie. it's giving "we are NOT doing that" ๐Ÿ’€
  • void set_rdbuf (basic_streambuf< _CharT, _Traits > *__sb)
  • void swap (basic_ios &__rhs) noexcept
  • void swap (basic_istream &__rhs)

๐ŸŒˆ Protected Attributes ๐ŸŒˆ

  • _Callback_list * _M_callbacks
  • const __ctype_type * _M_ctype
  • iostate _M_exception
  • char_type _M_fill
  • bool _M_fill_init
  • fmtflags _M_flags
  • streamsize _M_gcount
  • locale _M_ios_locale
  • _Words _M_local_word [_S_local_word_size]
  • const __num_get_type * _M_num_get
  • const __num_put_type * _M_num_put
  • streamsize _M_precision
  • basic_streambuf< _CharT, _Traits > * _M_streambuf
  • iostate _M_streambuf_state
  • basic_ostream< _CharT, _Traits > * _M_tie
  • streamsize _M_width
  • _Words * _M_word
  • int _M_word_size
  • _Words _M_word_zero

๐Ÿซถ Friends ๐Ÿซถ

  • class sentry โ€” our one and only friend. iconic. ๐Ÿ‘‘

๐Ÿ’– Detailed Description ๐Ÿ’–

template<typename _CharT, typename _Traits>
    class std::basic_istream< _CharT, _Traits >"Template class
    basic_istream.

Template Parameters

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

So like, this is the base class for all input streams, no cap. It provides text formatting of all builtin types, and it communicates with any class derived from basic_streambuf to do the actual input. She's the main character, the rest are supporting cast. ๐ŸŽ€


๐Ÿฆ‹ Member Typedef Documentation ๐Ÿฆ‹

__num_put_type

template<typename _CharT , typename _Traits > typedef num_put<_CharT,
    ostreambuf_iterator<_CharT, _Traits> > std::basic_ios< _CharT, _Traits
    >::__num_put_type [inherited]

These are non-standard types. (iykyk โ€” they're libstdc++'s own little house specials ๐Ÿ“)

event_callback

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

The type of an event callback function. ๐Ÿ“ž

Parameters

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

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

fmtflags

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

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

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

iostate

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

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

  • badbit
  • eofbit
  • failbit
  • goodbit

openmode

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

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

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

seekdir

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

This is an enumerated type. _Ios_Seekdir is implementation-defined. Defined values of type seekdir are:

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

โญ Member Enumeration Documentation โญ

enum std::ios_base::event [inherited]

The set of events that may be passed to an event callback. erase_event is used during ~ios() and copyfmt(). imbue_event is used during imbue(). copyfmt_event is used during copyfmt().


๐ŸŒธ Constructor & Destructor Documentation ๐ŸŒธ

basic_istream

template<typename _CharT , typename _Traits > std::basic_istream< _CharT,
    _Traits >::basic_istream (__streambuf_type * __sb) [inline],  [explicit]

Base constructor. This ctor is almost never called by the user directly โ€” rather from derived classes' initialization lists, which pass a pointer to their own stream buffer.

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

~basic_istream

template<typename _CharT , typename _Traits > virtual std::basic_istream<
    _CharT, _Traits >::~basic_istream () [inline],  [virtual]

Base destructor. This does very little apart from providing a virtual base dtor. lowkey she's just here to exist ๐Ÿ˜Œ

References std::basic_istream< _CharT, _Traits >::_M_gcount.


๐Ÿ’… Member Function Documentation ๐Ÿ’…

_M_getloc

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

Locale access.

Returns

A reference to the current locale.

Like getloc above, but returns a reference instead of generating a copy. ๐ŸŽ€

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

bad

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

Fast error checking. โšก

Returns

True if the badbit is set.

Careful bestie: note that other iostate flags may also be set. So don't go reading this as "only badbit, nothing else."

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

Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry().

clear

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

[Re]sets the error state. ๐Ÿ”„

Parameters

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

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

Okay bestie, before we move on, this lilโ€™ function is living rent-free in a bunch of other functionsโ€™ heads โ€” itโ€™s giving main character energy. Hereโ€™s the full name-drop squad (yes, duplicates and all, we donโ€™t edit the guest list):

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

๐Ÿ’… basic_ios::copyfmt

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

Copies fields of __rhs into this. Itโ€™s literally the โ€œcopy their whole vibeโ€ function, no cap.

Parameters:

  • __rhs โ€” The source values for the copies.

Returns: Reference to this object.

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

References:

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

๐Ÿฆ‹ basic_ios::eof

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

Fast error checking. Itโ€™s giving โ€œare we at the end?โ€ energy.

Returns: True if the eofbit is set.

Note that other iostate flags may also be set. So donโ€™t assume itโ€™s only EOF, bestie.

References:

  • std::ios_base::eofbit
  • std::basic_ios< _CharT, _Traits >::rdstate()

โœจ basic_ios::exceptions (const version)

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

Throwing exceptions on errors. This one just peeks at the mask, it doesnโ€™t touch anything.

Returns: The current exceptions mask.

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

Referenced by:

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

๐ŸŽ€ basic_ios::exceptions (mask-setting version)

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

Throwing exceptions on errors. This is the one where you actually set the mask.

Parameters:

  • __except โ€” The new exceptions mask.

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

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

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

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

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

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

    std::cerr << "Setting exception mask\n";
    f.exceptions (std::ios_base::badbit);
}

References:

  • std::basic_ios< _CharT, _Traits >::clear()

๐Ÿ’€ basic_ios::fail

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

Fast error checking. This is the โ€œdid something go wrong?โ€ vibe check.

Returns: True if either the badbit or the failbit is set.

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

References:

  • std::ios_base::badbit
  • std::ios_base::failbit
  • std::basic_ios< _CharT, _Traits >::rdstate()

Referenced by:

  • std::basic_ios< _CharT, _Traits >::operator bool()
  • std::basic_ios< _CharT, _Traits >::operator!()
  • std::basic_istream< _CharT, _Traits >::seekg()
  • std::basic_istream< _CharT, _Traits >::seekg()
  • std::basic_ostream< _CharT, _Traits >::seekp()
  • std::basic_ostream< _CharT, _Traits >::seekp()
  • std::basic_istream< _CharT, _Traits >::tellg()
  • std::basic_ostream< _CharT, _Traits >::tellp()
  • std::regex_traits< _Ch_type >::value()

๐ŸŒธ basic_ios::fill (const)

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

Retrieves the empty character. The โ€œwhat are we padding with?โ€ queen.

Returns: The current fill character.

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

References:

  • std::basic_ios< _CharT, _Traits >::widen()

Referenced by:

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

๐Ÿงš basic_ios::fill (setter)

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

Sets a new empty character. Changing the padding vibe, iconic.

Parameters:

  • __ch โ€” The new character.

Returns: The previous fill character.

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

References:

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

โญ ios_base::flags (getter)

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

Access to format flags. Peeking at the format control settings, no biggie.

Returns: The format control flags for both input and output.

Referenced by (a whole crowd):

  • 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>>()
  • std::operator>>()
  • std::operator>>()

๐Ÿ”ฅ ios_base::flags (setter)

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

Setting new format flags all at once. Itโ€™s a full glow-up for the flags.

Parameters:

  • __fmtfl โ€” The new flags to set.

Returns: The previous format control flags.

This function overwrites all the format flags with __fmtfl. No merge, just replace, periodt.


๐Ÿ‘‘ basic_istream::gcount

template<typename _CharT , typename _Traits > streamsize std::basic_istream<
_CharT, _Traits >::gcount () const [inline]

Character counting. Itโ€™s literally counting how many characters got extracted last time.

Returns: The number of characters extracted by the previous unformatted input function dispatched for this stream.

References:

  • std::basic_istream< _CharT, _Traits >::_M_gcount

๐Ÿ“ basic_istream::get (no args)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
>::int_type std::basic_istream< _CharT, _Traits >::get (void)

Simple extraction. Grabbing one character, lowkey.

Returns: A character, or eof().

Tries to extract a character. If none are available, sets failbit and returns traits::eof().

References:

  • std::basic_istream< _CharT, _Traits >::_M_gcount
  • std::ios_base::badbit
  • std::ios_base::eofbit
  • std::ios_base::failbit
  • std::ios_base::goodbit
  • std::basic_ios< _CharT, _Traits >::rdbuf()
  • std::basic_ios< _CharT, _Traits >::setstate()

Referenced by:

  • std::basic_istream< _CharT, _Traits >::get()
  • std::basic_istream< _CharT, _Traits >::get()

๐Ÿฆ‹ basic_istream::get (streambuf)

template<typename _CharT , typename _Traits > __istream_type &
std::basic_istream< _CharT, _Traits >::get (__streambuf_type & __sb) [inline]

Extraction into another streambuf. Sending the characters to a different spot.

Parameters:

  • __sb โ€” A streambuf in which to store data.

Returns: *this

Returns get(__sb,widen('\n')).

References:

  • std::basic_istream< _CharT, _Traits >::get()
  • std::basic_ios< _CharT, _Traits >::widen()

๐Ÿ’œ basic_istream::get (streambuf + delim)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
> & std::basic_istream< _CharT, _Traits >::get (__streambuf_type & __sb,
char_type __delim)

Extraction into another streambuf. Same energy, but now with a stop character.

Parameters:

  • __sb โ€” A streambuf in which to store data.
  • __delim โ€” A 'stop' character.

Returns: *this

Characters are extracted and inserted into __sb until one of the following happens:

  • the input sequence reaches EOF
  • insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
  • the next character equals __delim (in this case, the character is not extracted)
  • an exception occurs (and in this case is caught)

If no characters are stored, failbit is set in the stream's error state.

References:

  • std::basic_istream< _CharT, _Traits >::_M_gcount
  • std::ios_base::goodbit

๐ŸŒˆ basic_istream::get (char ref)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
> & std::basic_istream< _CharT, _Traits >::get (char_type & __c)

Simple extraction. One character, stored right into __c.

Parameters:

  • __c โ€” The character in which to store data.

Returns: *this

Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().

Note: This function is not overloaded on signed char and unsigned char.

References:

  • std::basic_istream< _CharT, _Traits >::_M_gcount
  • std::ios_base::badbit
  • std::ios_base::eofbit
  • std::ios_base::failbit
  • std::ios_base::goodbit
  • std::basic_ios< _CharT, _Traits >::rdbuf()
  • std::basic_ios< _CharT, _Traits >::setstate()

๐ŸŽ€ basic_istream::get (char array)

template<typename _CharT , typename _Traits > __istream_type &
std::basic_istream< _CharT, _Traits >::get (char_type * __s, streamsize
__n) [inline]

Simple multiple-character extraction. Itโ€™s the group-chat version of get โ€” more than one character at a time.

Parameters:

  • __s โ€” Pointer to an array.
  • __n โ€” Maximum number of characters to store in s.

Returns: *this

Returns get(__s,__n,widen('\n')).

References:

  • std::basic_istream< _CharT, _Traits >::get()
  • std::basic_ios< _CharT, _Traits >::widen()

๐Ÿ’– basic_istream::get (char array + delim)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
> & std::basic_istream< _CharT, _Traits >::get (char_type * __s,
streamsize __n, char_type __delim)

Simple multiple-character extraction. Same array vibe, but you get to pick the stop character.

Parameters:

  • __s โ€” Pointer to an array.
  • __n โ€” Maximum number of characters to store in __s.
  • __delim โ€” A 'stop' character.

Returns: *this

Characters are extracted and stored into __s until one of the following happens:

  • __n-1 characters are stored
  • the input sequence reaches EOF
  • the next character equals __delim, in which case the character is not extracted

If no characters are stored, failbit is set in the stream's error state.

In any case, a null character is stored into the next location in the array.

Note: This function is not overloaded on signed char and unsigned char.

References:

  • std::basic_istream< _CharT, _Traits >::_M_gcount
  • std::ios_base::goodbit
  • std::basic_ios< _CharT, _Traits >::rdbuf()
  • std::basic_streambuf< _CharT, _Traits >::sgetc()

๐Ÿ’– getline โ€” string extraction (the short one)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::getline (char_type * __s,
    streamsize __n) [inline]

okay so this one is the cutie little two-arg version of string extraction โœจ

  • Parameters
    • __s โ€” a character array in which to store the data ๐Ÿซถ
    • __n โ€” maximum number of characters to extract
  • Returns โ€” *this

Literally just returns getline(__s,__n,widen('\n')). That's the whole vibe, no cap ๐Ÿ’…

References std::basic_istream< _CharT, _Traits >::getline(), and std::basic_ios< _CharT, _Traits >::widen().


๐ŸŽ€ getline โ€” string extraction (the full version, with the delimiter)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::getline (char_type * __s,
    streamsize __n, char_type __delim)
  • Parameters
    • __s โ€” a character array in which to store the data ๐ŸŒธ
    • __n โ€” maximum number of characters to extract
    • __delim โ€” a 'stop' character
  • Returns โ€” *this

So it extracts and stores characters into __s until one of these things happens. And bestie, listen โ€” these criteria are required to be tested in the order listed here, specifically so that an input line can exactly fill the __s array without setting failbit. Order matters, iykyk ๐Ÿ‘‘

  1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
  2. the next character equals __delim, in which case the character is extracted (and therefore counted in gcount()) but not stored
  3. __n-1 characters are stored, in which case failbit is set in the stream error state

If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set โ€” love that for us fr fr.)

In any case, a null character is stored in the next location in the array. periodt โœจ

Referenced by std::basic_istream< _CharT, _Traits >::getline().


๐Ÿฆ‹ getline โ€” the char specialization

basic_istream< char > & std::basic_istream< char >::getline (char_type *
    __s, streamsize __n, char_type __delim)

Explicit specialization declarations, defined in src/istream.cc. that's it that's the whole thing ๐Ÿ’€


๐Ÿงš getloc โ€” locale access

locale std::ios_base::getloc () const [inline], [inherited]
  • Returns โ€” a copy of the current locale ๐ŸŽ€

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

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


โญ good โ€” fast error checking

template<typename _CharT , typename _Traits > bool std::basic_ios< _CharT,
    _Traits >::good () const [inline], [inherited]
  • Returns โ€” True if no error flags are set โœ…

It's a wrapper around rdstate. simple, clean, no drama.

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

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


๐Ÿ’… ignore โ€” simple extraction (no args)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::ignore (void)
  • Returns โ€” a character, or eof()

Tries to extract a character. If none are available, sets failbit and returns traits::eof(). ๐Ÿ˜ญ

References std::basic_istream< _CharT, _Traits >::_M_gcount, std::ios_base::eofbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_streambuf< _CharT, _Traits >::sbumpc().


๐ŸŒˆ ignore โ€” simple extraction (with a count)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::ignore (streamsize __n)
  • Returns โ€” a character, or eof()

Tries to extract a character. If none are available, sets failbit and returns traits::eof(). same energy, different overload ๐Ÿ’ซ

References std::basic_istream< _CharT, _Traits >::_M_gcount, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_streambuf< _CharT, _Traits >::sgetc().


๐Ÿ”ฅ ignore โ€” discarding characters (count + delimiter)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::ignore (streamsize __n,
    int_type __delim)
  • Parameters
    • __n โ€” number of characters to discard
    • __delim โ€” a 'stop' character
  • Returns โ€” *this

Extracts characters and throws them away (bye bestie ๐Ÿ‘‹) until one of the following happens:

  • if __n != std::numeric_limits<int>::max(), __n characters are extracted
  • the input sequence reaches end-of-file
  • the next character equals __delim (in this case, the character is extracted); note that this condition will never occur if __delim equals traits::eof()
NB: provide three overloads, instead of the single function (with defaults) mandated by the Standard โ€” this leads to a better performing implementation, while still conforming to the Standard. slay ๐Ÿ’…

๐ŸŒธ imbue โ€” moving to a new locale

template<typename _CharT , typename _Traits > locale std::basic_ios< _CharT,
    _Traits >::imbue (const locale & __loc) [inherited]
  • Parameters
    • __loc โ€” the new locale
  • Returns โ€” the previous locale

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

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

References std::ios_base::imbue().

Referenced by std::chrono::operator<<().


๐Ÿ‘‘ init โ€” all the setup, performed here

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

All setup is performed here. This is called from the public constructor. It is not virtual and cannot be redefined. no notes, main character energy only โœจ

Referenced by โ€” okay this list is lowkey a lot, but we keep every single one, no skipping:

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

(yes the repeats are real, that's literally how it's listed ๐Ÿ’€)


๐Ÿ“ iword โ€” access to integer array

long & std::ios_base::iword (int __ix) [inline], [inherited]
  • 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. like, do not get attached, she moves ๐Ÿ’€


๐Ÿงš narrow โ€” squeezes characters

template<typename _CharT , typename _Traits > char std::basic_ios< _CharT,
    _Traits >::narrow (char_type __c, char __dfault) const [inline],
    [inherited]
  • Parameters
    • __c โ€” the character to narrow
    • __dfault โ€” the character to narrow
  • Returns โ€” the narrowed character

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

Returns the result of

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

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


๐Ÿ’œ operator bool โ€” the quick-and-easy status check

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

The quick-and-easy status check. This allows you to write constructs such as if (!a_stream) ... and while (a_stream) ... โ€” genuinely so convenient, obsessed โœจ

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


๐ŸŽ€ operator! โ€” the other quick-and-easy status check

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

The quick-and-easy status check. This allows you to write constructs such as if (!a_stream) ... and while (a_stream) ... ๐Ÿซถ

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


โญ operator>> โ€” interface for manipulators (the __ios_type one)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (__ios_type
    &(*)(__ios_type &) __pf) [inline]

Interface for manipulators. Manipulators such as std::ws and std::dec use these functions in constructs like std::cin >> std::ws. For more information, see the iomanip header. ๐Ÿ’…


๐Ÿฆ‹ operator>> โ€” interface for manipulators (the __istream_type one)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (__istream_type
    &(*)(__istream_type &) __pf) [inline]

Interface for manipulators. Manipulators such as std::ws and std::dec use these functions in constructs like std::cin >> std::ws. For more information, see the iomanip header. ๐ŸŒธ


๐Ÿ”ฅ operator>> โ€” extracting into another streambuf

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::operator>> (__streambuf_type
    * __sb)
  • Parameters
    • __sb โ€” a pointer to a streambuf

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

If __sb is NULL, the stream will set failbit in its error state. ๐Ÿšจ

Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:

  • the input stream reaches end-of-file,
  • insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
  • an exception occurs (and in this case is caught)

If the function inserts no characters, failbit is set. ๐Ÿ˜ญ

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


๐Ÿ‘‘ operator>> โ€” integer arithmetic extractors (bool)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (bool & __n) [inline]
  • Parameters
    • __n โ€” a variable of builtin integral type
  • Returns โ€” *this if successful โœ…

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data. that's the whole tea, bestie ๐Ÿตโœจ

๐Ÿ“ operator>>(double& __f)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (double & __f)
    [inline]

Floating point arithmetic extractors, bestie ๐Ÿ’–

  • Parameters โ€” __f: a variable of builtin floating point type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale to parse the input data (specifically, the num_get facet). iykyk โœจ


๐ŸŒธ operator>>(float& __f)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (float & __f) [inline]

Floating point arithmetic extractors ๐Ÿ’…

  • Parameters โ€” __f: a variable of builtin floating point type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐ŸŽ€ operator>>(int& __n)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::operator>> (int & __n)

Integer arithmetic extractors ๐Ÿ”ฅ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data. no cap.


๐Ÿฆ‹ operator>>(ios_base& (*__pf)(ios_base&))

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (ios_base
    &(*)(ios_base &) __pf) [inline]

Interface for manipulators, periodt โœจ Manipulators such as std::ws and std::dec use these functions in constructs like std::cin >> std::ws. For more information, see the iomanip header.


๐Ÿ’œ operator>>(long& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (long & __n) [inline]

Integer arithmetic extractors ๐Ÿ‘‘

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐ŸŒˆ operator>>(long double& __f)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (long double & __f)
    [inline]

Floating point arithmetic extractors ๐Ÿ’–

  • Parameters โ€” __f: a variable of builtin floating point type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data. literally the same slay as before but bigger ๐Ÿ’…


โญ operator>>(long long& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (long long & __n)
    [inline]

Integer arithmetic extractors โœจ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐Ÿงš operator>>(short& __n)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::operator>> (short & __n)

Integer arithmetic extractors ๐Ÿซถ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.

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

okay this one's got the extra bit set energy โ€” badbit, failbit, goodbit, all of it ๐Ÿ’€

๐ŸŒบ operator>>(unsigned int& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (unsigned int & __n)
    [inline]

Integer arithmetic extractors ๐Ÿ’–

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐Ÿ“ operator>>(unsigned long& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (unsigned long & __n)
    [inline]

Integer arithmetic extractors โœจ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐ŸŽ€ operator>>(unsigned long long& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (unsigned long long &
    __n) [inline]

Integer arithmetic extractors ๐Ÿ”ฅ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐Ÿฆ‹ operator>>(unsigned short& __n)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (unsigned short & __n)
    [inline]

Integer arithmetic extractors ๐Ÿ’œ

  • Parameters โ€” __n: a variable of builtin integral type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐Ÿ‘‘ operator>>(void*& __p)

template<typename _CharT , typename _Traits > __istream_type &
    std::basic_istream< _CharT, _Traits >::operator>> (void *& __p) [inline]

Basic arithmetic extractors ๐ŸŒŸ

  • Parameters โ€” __p: a variable of pointer type.
  • Returns โ€” *this if successful.

These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.


๐Ÿ” peek()

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    >::int_type std::basic_istream< _CharT, _Traits >::peek (void)

Looking ahead in the stream ๐Ÿ‘€ no touching, just vibes.

  • Returns โ€” the next character, or eof().

If, after constructing the sentry object, good() is false, returns traits::eof(). Otherwise reads but does not extract the next input character. Like window shopping for characters, bestie ๐Ÿ›๏ธ

References: std::basic_istream< _CharT, _Traits >::_M_gcount.


๐Ÿ“ std::ios_base::precision() const

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

Flags access โœจ

  • Returns โ€” the precision to generate on certain output operations.
โš ๏ธ Be careful if you try to give a definition of precision here; see DR 189. (the standard committee said "not today" ๐Ÿ˜ญ)

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


๐Ÿ“ std::ios_base::precision(streamsize __prec)

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

Changing flags ๐Ÿ’…

  • Parameters โ€” __prec: the new precision value.
  • Returns โ€” the previous value of precision().

it's giving "here's your old one back, thanks for the trade" ๐Ÿซถ


โ†ฉ๏ธ putback(char_type __c)

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits
    > & std::basic_istream< _CharT, _Traits >::putback (char_type __c)

Unextracting a single character ๐Ÿ˜ญ yes, "unextracting" is a real word here, we love a glow-up in reverse.

  • Parameters โ€” __c: the character to push back into the input stream.
  • Returns โ€” *this

If rdbuf() is not null, calls rdbuf()->sputbackc(c).

If rdbuf() is null or if sputbackc() fails, sets badbit in the error state.

๐Ÿ“Œ Note: This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as required by DR 60. periodt.

References: std::basic_istream< _CharT, _Traits >::_M_gcount, std::ios_base::badbit, std::basic_ios< _CharT, _Traits >::clear(), std::ios_base::eofbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::rdstate(), std::basic_ios< _CharT, _Traits >::setstate(), and std::basic_streambuf< _CharT, _Traits >::sputbackc().

Referenced by: std::operator<<().


๐Ÿซง std::ios_base::pword(int __ix)

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

Access to void pointer array ๐ŸŽฏ

  • 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. ๐Ÿ’€ like holding a balloon that might get relocated mid-party.


๐Ÿงบ rdbuf() const

template<typename _CharT , typename _Traits > basic_streambuf< _CharT,
    _Traits > * std::basic_ios< _CharT, _Traits >::rdbuf () const [inline],
    [inherited]

Accessing the underlying buffer ๐Ÿ’–

  • Returns โ€” the current stream buffer.

This does not change the state of the stream. zero drama, just peek at the buffer ๐Ÿ‘‘

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< char >::get(), std::basic_istream< _CharT, _Traits >::get(), std::getline(), std::getline(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::tr2::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< char >::readsome(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_istream< _CharT, _Traits >::sync(), std::basic_istream< _CharT, _Traits >::tellg(), std::basic_ostream< _CharT, _Traits >::tellp(), and std::ws().

like, literally everyone wants a piece of this function ๐Ÿ˜ญ main character energy fr.


๐Ÿ”„ rdbuf(basic_streambuf<_CharT, _Traits>* __sb)

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

Changing the underlying buffer ๐ŸŽ€

  • Parameters โ€” __sb: the new stream buffer.
  • Returns โ€” the previous stream buffer.

Associates a new buffer with the current stream, and clears the error state.

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

For example:

std::fstream     foo;         // or some other derived type
std::streambuf*  p = .....;

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

"hysterical raisins" lives in my head rent free ๐Ÿ‡๐Ÿ˜ญ


๐Ÿšฆ rdstate() const

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

Returns the error state of the stream buffer.

  • Returns โ€” a bit pattern (well, isn't everything?) โœจ

See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good(). slay.

Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(), std::basic_ios< _CharT, _Traits >::good(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ios< _CharT, _Traits >::setstate(), and std::basic_istream< _CharT, _Traits >::unget(). Thatโ€™s the whole little guest list, bestie ๐Ÿ’….

read โ€” extraction without delimiters โœจ

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::basic_istream< _CharT, _Traits >::read (char_type * __s, streamsize __n)

Okay so this one is extraction without delimiters, no cap. ๐ŸŽ€

Parameters

  • __s โ€” a character array.
  • __n โ€” maximum number of characters to store.

Returns

*this

If the stream state is good(), it extracts characters and stores them into __s until one of these things happens:

  • __n characters are stored
  • the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note: this function is not overloaded on signed char and unsigned char. ๐Ÿ’€

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


readsome โ€” extraction until the buffer is exhausted, but no more ๐Ÿฆ‹

template<typename _CharT , typename _Traits > streamsize std::basic_istream< _CharT, _Traits >::readsome (char_type * __s, streamsize __n)

Parameters

  • __s โ€” a character array.
  • __n โ€” maximum number of characters to store.

Returns

The number of characters extracted.

It extracts characters and stores them into __s depending on how many characters are remaining in the streambufโ€™s buffer, rdbuf()->in_avail(), called A here:

  • if A == -1, sets eofbit and extracts no characters
  • if A == 0, extracts no characters
  • if A > 0, extracts min(A,n)

The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the streambuf. Main character buffer energy, honestly. โœจ

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


register_callback โ€” add the callback __fn with parameter __index ๐ŸŽ€

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

(inherited)

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. Order matters, bestie โ€” the callbacks are literally queued in registration order. ๐Ÿ’…


seekg โ€” changing the current read position ๐ŸŒธ

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::basic_istream< _CharT, _Traits >::seekg (off_type __off, ios_base::seekdir __dir)

Parameters

  • __off โ€” a file offset object.
  • __dir โ€” the direction in which to seek.

Returns

*this

If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.

Note: this function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not affect the next call to gcount(). ๐Ÿ˜Œ

References: std::ios_base::badbit, std::basic_ios< _CharT, _Traits >::clear(), std::ios_base::eofbit, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::goodbit, std::ios_base::in, std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::rdstate(), and std::basic_ios< _CharT, _Traits >::setstate().


seekg โ€” changing the current read position, position-object edition ๐Ÿฆ‹

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::basic_istream< _CharT, _Traits >::seekg (pos_type __pos)

Parameters

  • __pos โ€” a file position object.

Returns

*this

If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.

Note: this function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not affect the next call to gcount(). ๐Ÿซถ

References: std::ios_base::badbit, std::basic_ios< _CharT, _Traits >::clear(), std::ios_base::eofbit, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::goodbit, std::ios_base::in, std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::rdstate(), and std::basic_ios< _CharT, _Traits >::setstate().


setf โ€” setting new format flags ๐ŸŒˆ

fmtflags std::ios_base::setf (fmtflags __fmtfl)

(inline, inherited)

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. Stack โ€™em, donโ€™t replace โ€™em, basically. โœจ

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


setf โ€” setting new format flags with a mask ๐Ÿ’…

fmtflags std::ios_base::setf (fmtflags __fmtfl, fmtflags __mask)

(inline, inherited)

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. Mask on, flags set, previous flags returned โ€” sheโ€™s organized. ๐ŸŽ€


setstate โ€” sets additional flags in the error state ๐Ÿ”ฅ

template<typename _CharT , typename _Traits > void std::basic_ios< _CharT, _Traits >::setstate (iostate __state)

(inline, inherited)

Parameters

  • __state โ€” the additional state flag(s) to set.

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

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

Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::~sentry(), std::basic_ifstream< _CharT, _Traits >::close(), std::basic_ofstream< _CharT, _Traits >::close(), std::basic_fstream< _CharT, _Traits >::close(), std::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::getline(), std::getline(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::basic_ifstream< _CharT, _Traits >::open(), std::basic_fstream< _CharT, _Traits >::open(), std::basic_ofstream< _CharT, _Traits >::open(), std::operator<<(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::tr2::operator>>(), std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_istream< _CharT, _Traits >::sync(), and std::ws().

That is a whole crowd of references, bestie โ€” sheโ€™s popular. ๐Ÿ‘‘


sync โ€” synchronizing the stream buffer โญ

template<typename _CharT , typename _Traits > int std::basic_istream< _CharT, _Traits >::sync (void)

Returns

0 on success, -1 on failure.

If rdbuf() is a null pointer, returns -1.

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

Otherwise, returns 0.

Note: this function does not count the number of characters extracted, if any, and therefore does not affect the next call to gcount(). ๐Ÿ˜ญ

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


sync_with_stdio โ€” interaction with the standard C I/O objects ๐Ÿ“

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

(static, inherited)

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.

Only the standard ones, okay? Your own little streams are living their own lives. ๐Ÿฆ‹


tellg โ€” getting the current read position ๐ŸŽ€

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits >::pos_type std::basic_istream< _CharT, _Traits >::tellg (void)

Returns

A file position object.

If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).

Note: this function does not count the number of characters extracted, if any, and therefore does not affect the next call to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first. ๐Ÿ’€

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


tie โ€” fetches the current tied stream ๐ŸŒธ

template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie () const

(inline, inherited)

Returns

A pointer to the tied stream, or NULL if the stream is not tied.

A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream is first flushed. For example, std::cin is tied to std::cout. Itโ€™s giving โ€œflush your bestie before you readโ€ energy. ๐Ÿ’…

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


tie โ€” ties this stream to an output stream ๐Ÿซถ

template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie (basic_ostream< _CharT, _Traits > * __tiestr)

(inline, inherited)

Parameters

  • __tiestr โ€” the output stream.

Returns

The previously tied output stream, or NULL if the stream was not tied.

This sets up a new tie; see tie() for more. New tie, who dis โ€” but it still hands back the old one. โœจ


unget โ€” unextracting the previous character ๐Ÿ’œ

template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::basic_istream< _CharT, _Traits >::unget (void)

Returns

*this

If rdbuf() is not null, calls rdbuf()->sungetc(c).

If rdbuf() is null or if sungetc() fails, sets badbit in the error state. Put it back or catch these bad vibes, bestie. ๐Ÿ˜ญ

Note ๐Ÿ’ก โ€” This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as required by DR 60.

References: std::basic_istream< _CharT, _Traits >::_M_gcount, std::basic_ios< _CharT, _Traits >::clear(), std::ios_base::eofbit, std::ios_base::goodbit, and std::basic_ios< _CharT, _Traits >::rdstate().

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


๐Ÿ’– Member Data Documentation ๐Ÿ’–

Okay bestie, this is the data-member section, and yes, it's giving "long but important." Every declaration, every reference list, every little inherited flag โ€” all here, no skips. ๐Ÿซถ

  • template<typename _CharT , typename _Traits > streamsize std::basic_istream< _CharT, _Traits >::_M_gcount [protected] โ€” the number of characters extracted in the previous unformatted function; see gcount().
    • Referenced by: std::basic_istream< _CharT, _Traits >::~basic_istream(), std::basic_istream< _CharT, _Traits >::gcount(), 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::basic_istream< char >::get(), std::basic_istream< char >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< char >::operator>>(), std::basic_istream< _CharT, _Traits >::peek(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< char >::putback(), std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< char >::readsome(), std::basic_istream< char >::sync(), and std::basic_istream< _CharT, _Traits >::unget().
  • const fmtflags std::ios_base::adjustfield [static], [inherited] โ€” 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], [inherited] โ€” seek to end before each write.
    • Referenced by: std::basic_filebuf< _CharT, _Traits >::_M_set_buffer(), std::basic_filebuf< _CharT, _Traits >::overflow(), and std::basic_filebuf< _CharT, _Traits >::xsputn().
  • const openmode std::ios_base::ate [static], [inherited] โ€” open and seek to end immediately after opening.
    • Referenced by: std::basic_filebuf< _CharT, _Traits >::open().
  • const iostate std::ios_base::badbit [static], [inherited] โ€” indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file).
    • 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().
  • const fmtflags std::ios_base::basefield [static], [inherited] โ€” 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], [inherited] โ€” request a seek relative to the beginning of the stream.
    • Referenced by: std::basic_filebuf< _CharT, _Traits >::seekpos().
  • const openmode std::ios_base::binary [static], [inherited] โ€” perform input and output in binary mode (as opposed to text mode). This is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary.
    • Referenced by: std::basic_filebuf< _CharT, _Traits >::showmanyc().
  • const fmtflags std::ios_base::boolalpha [static], [inherited] โ€” insert/extract bool in alphabetic rather than numeric format.
    • 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], [inherited] โ€” request a seek relative to the current position within the sequence.
    • 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], [inherited] โ€” converts integer input or generates integer output in decimal base.
    • Referenced by: std::dec().
  • const seekdir std::ios_base::end [static], [inherited] โ€” request a seek relative to the current end of the sequence.
    • Referenced by: std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff().
  • const iostate std::ios_base::eofbit [static], [inherited] โ€” indicates that an input operation reached the end of an input sequence.
    • 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], [inherited] โ€” indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.
    • 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], [inherited] โ€” generate floating-point output in fixed-point notation.
    • Referenced by: std::fixed(), and std::hexfloat().
  • const fmtflags std::ios_base::floatfield [static], [inherited] โ€” 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], [inherited] โ€” the โ€œeverything is literally fineโ€ state: Indicates all is well. ๐Ÿ’–

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

  • const fmtflags std::ios_base::hex [static], [inherited] โ€” hexadecimal era: Converts integer input or generates integer output in hexadecimal base. ๐Ÿงฎ

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

  • const openmode std::ios_base::in [static], [inherited] โ€” open for input. 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], [inherited] โ€” the โ€œput the fill in the middleโ€ option: 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], [inherited] โ€” Adds fill characters on the right (final positions) of certain generated output. (I.e., the thing you print is flush left.) โฌ…๏ธโœจ

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

  • const fmtflags std::ios_base::oct [static], [inherited] โ€” octal moment: Converts integer input or generates integer output in octal base. ๐Ÿ™

Referenced by: std::oct().

  • const openmode std::ios_base::out [static], [inherited] โ€” open for output. Default for ofstream and fstream. ๐Ÿ“ค

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

  • const fmtflags std::ios_base::right [static], [inherited] โ€” 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], [inherited] โ€” science-y float energy: Generates floating-point output in scientific notation. ๐Ÿ”ฌ

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

  • const fmtflags std::ios_base::showbase [static], [inherited] โ€” Generates a prefix indicating the numeric base of generated integer output. ๐Ÿท๏ธ

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

  • const fmtflags std::ios_base::showpoint [static], [inherited] โ€” Generates a decimal-point character unconditionally in generated floating-point output. ๐Ÿ’ง

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

  • const fmtflags std::ios_base::showpos [static], [inherited] โ€” Generates a + sign in non-negative generated numeric output. โž•

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

  • const fmtflags std::ios_base::skipws [static], [inherited] โ€” Skips leading white space before certain input operations. ๐Ÿซง

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

  • const openmode std::ios_base::trunc [static], [inherited] โ€” Truncate an existing stream when opening. Default for ofstream. โœ‚๏ธ No Referenced by list on this one.
  • const fmtflags std::ios_base::unitbuf [static], [inherited] โ€” Flushes output after each output operation. ๐Ÿšฝโœจ

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

  • const fmtflags std::ios_base::uppercase [static], [inherited] โ€” Replaces certain lowercase letters with their uppercase equivalents in generated output. ๐Ÿ” 

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. ๐Ÿ’…

Source/version tea โ˜•: this page says it was generated automatically by Doxygen for libstdc++ from the source code, and the footer tag is libstdstd::basic_ist...harT, _Traits >(3cxx). Date slot: not printed here, so no invented date โ€” periodt. ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from