STD::OFSTREAM(3)
Hey bestie! ๐ Welcome to the Library Functions Manual, section 3. We're about to vibe with std::basic_ofstream< _CharT, _Traits >. It's literally the main character for controlling output to files. ๐โจ No cap.
โจ NAME โจ
std::basic_ofstream< _CharT, _Traits > โ it's giving "controlling output for files." ๐
๐
๐ธ SYNOPSIS ๐ธ
#include <fstream>
Inherits std::basic_ostream< _CharT, _Traits >. ๐
๐ Public Types ๐
typedef ctype< _CharT > __ctype_typetypedef basic_filebuf< char_type, traits_type > __filebuf_typetypedef basic_ios< _CharT, _Traits > __ios_typetypedef num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > __num_put_typetypedef basic_ostream< char_type, traits_type > __ostream_typetypedef basic_streambuf< _CharT, _Traits > __streambuf_typetypedef _CharT char_typeenum event { erase_event, imbue_event, copyfmt_event }โ the set of events that may be passed to an event callback. ๐typedef void(* event_callback) (event __e, ios_base &__b, int __i)โ the type of an event callback function. ๐typedef _Ios_Fmtflags fmtflagsโ this is a bitmask type. ๐ขtypedef traits_type::int_type int_typetypedef _Ios_Iostate iostateโ this is a bitmask type. ๐ขtypedef traits_type::off_type off_typetypedef _Ios_Openmode openmodeโ this is a bitmask type. ๐ขtypedef traits_type::pos_type pos_typetypedef _Ios_Seekdir seekdirโ this is an enumerated type. ๐typedef _Traits traits_typetypedef num_get< _CharT, istreambuf_iterator< _CharT, _Traits > > __num_get_type
๐ซถ Public Member Functions ๐ซถ
basic_ofstream ()โ default constructor. โจbasic_ofstream (basic_ofstream &&__rhs)template<typename _Path, typename _Require = _If_fs_path<_Path>> basic_ofstream (const _Path &__s, ios_base::openmode __mode=ios_base::out)โ create an output file stream. ๐basic_ofstream (const basic_ofstream &)=deleteโ not today, bestie. ๐ซbasic_ofstream (const char *__s, ios_base::openmode __mode=ios_base::out)โ create an output file stream. ๐basic_ofstream (const std::string &__s, ios_base::openmode __mode=ios_base::out)โ create an output file stream. ๐~basic_ofstream ()โ the destructor does nothing. ๐คconst locale & _M_getloc () constโ locale access. ๐template<typename _ValueT> basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v)void _M_setstate (iostate __state)bool bad () constโ fast error checking. ๐จvoid clear (iostate __state=goodbit)โ [re]sets the error state. ๐งนvoid close ()โ close the file. ๐basic_ios & copyfmt (const basic_ios &__rhs)โ copies fields of__rhsinto this. ๐bool eof () constโ fast error checking. ๐จiostate exceptions () constโ throwing exceptions on errors. ๐ฅvoid exceptions (iostate __except)โ throwing exceptions on errors. ๐ฅbool fail () constโ fast error checking. ๐จchar_type fill () constโ retrieves the empty character. ๐ณ๏ธchar_type fill (char_type __ch)โ sets a new empty character. ๐ณ๏ธfmtflags flags () constโ access to format flags. ๐ฉfmtflags flags (fmtflags __fmtfl)โ setting new format flags all at once. ๐ฉ__ostream_type & flush ()โ synchronizing the stream buffer. ๐ฝlocale getloc () constโ locale access. ๐bool good () constโ fast error checking. ๐จlocale imbue (const locale &__loc)โ moves to a new locale. ๐bool is_open ()โ wrapper to test for an open file. ๐bool is_open () constlong & iword (int __ix)โ access to integer array. ๐ขchar narrow (char_type __c, char __dfault) constโ squeezes characters. ๐๏ธtemplate<typename _Path> _If_fs_path< _Path, void > open (const _Path &__s, ios_base::openmode __mode=ios_base::out)โ opens an external file. ๐void open (const char *__s, ios_base::openmode __mode=ios_base::out)โ opens an external file. ๐void open (const std::string &__s, ios_base::openmode __mode=ios_base::out)โ opens an external file. ๐__ostream_type & operator<< (__streambuf_type *__sb)โ extracting from another streambuf. ๐ฃ__ostream_type & operator<< (const void *__p)โ pointer arithmetic inserters. ๐__ostream_type & operator<< (const volatile void *__p)__ostream_type & operator<< (nullptr_t)basic_ofstream & operator= (basic_ofstream &&__rhs)basic_ofstream & operator= (const basic_ofstream &)=deletestreamsize precision () constโ flags access. ๐ฏstreamsize precision (streamsize __prec)โ changing flags. ๐ฏvoid *& pword (int __ix)โ access to void pointer array. ๐basic_streambuf< _CharT, _Traits > * rdbuf (basic_streambuf< _CharT, _Traits > *__sb)โ changing the underlying buffer. ๐__filebuf_type * rdbuf () constโ accessing 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__fnwith parameter__index. ๐__ostream_type & seekp (off_type, ios_base::seekdir)โ changing the current write position. ๐__ostream_type & seekp (pos_type)โ changing the current write position. ๐fmtflags setf (fmtflags __fmtfl)โ setting new format flags. ๐ฉfmtflags setf (fmtflags __fmtfl, fmtflags __mask)โ setting new format flags. ๐ฉvoid setstate (iostate __state)โ sets additional flags in the error state. ๐ฉvoid swap (basic_ofstream &__rhs)pos_type tellp ()โ getting the current write position. ๐basic_ostream< _CharT, _Traits > * tie () constโ fetches the current tied stream. ๐basic_ostream< _CharT, _Traits > * tie (basic_ostream< _CharT, _Traits > *__tiestr)โ ties this stream to an output stream. ๐void unsetf (fmtflags __mask)โ clearing format flags. ๐งนchar_type widen (char __c) constโ widens characters. โ๏ธstreamsize width () constโ flags access. ๐streamsize width (streamsize __wide)โ changing flags. ๐__ostream_type & operator<< (__ostream_type &(*__pf)(__ostream_type &))โ interface for manipulators. ๐๏ธ__ostream_type & operator<< (__ios_type &(*__pf)(__ios_type &))โ interface for manipulators. ๐๏ธ__ostream_type & operator<< (ios_base &(*__pf)(ios_base &))โ interface for manipulators. ๐๏ธ
๐ฅ Inserters ๐ฅ
Okay so all the operator<< functions (aka formatted output functions) have some common behavior. Each one starts by constructing a temporary object of type std::basic_ostream::sentry. This can have 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 generate whatever data is appropriate for the type of the argument. โจ
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without causing an ios_base::failure to be thrown. The original exception will then be rethrown. ๐ฑ
__ostream_type & operator<< (long __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (unsigned long __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (bool __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (short __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (unsigned short __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (int __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (unsigned int __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (long long __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (unsigned long long __n)โ integer arithmetic inserters. ๐ข__ostream_type & operator<< (double __f)โ floating point arithmetic inserters. ๐งฎ__ostream_type & operator<< (float __f)โ floating point arithmetic inserters. ๐งฎ__ostream_type & operator<< (long double __f)โ floating point arithmetic inserters. ๐งฎ
๐ธ Unformatted Output Functions ๐ธ
All the unformatted output functions have some common behavior. Each one starts by constructing a temporary object of type std::basic_ostream::sentry. 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 generate whatever data is appropriate for the type of the argument. โจ
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state. If badbit is on in the stream's exceptions mask, the exception will be rethrown without completing its actions. ๐ฅ
__ostream_type & put (char_type __c)โ simple insertion. ๐ฏ__ostream_type & write (const char_type *__s, streamsize __n)โ character string insertion. โ๏ธoperator bool () constโ the quick-and-easy status check. โbool operator! () constโ the quick-and-easy status check. โ
๐ Static Public Member Functions ๐
static bool sync_with_stdio (bool __sync=true)โ interaction with the standard C I/O objects. ๐static int xalloc () throw ()โ access to unique indices. ๐
๐ธ Static Public Attributes ๐ธ
okay so these are the static constants the class hands you, and bestie, there's a LOT. they're your little building blocks for flags and modes, no cap ๐
static const openmode __noreplaceโ (no description given, it's just there, living its truth โจ)static 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. ๐ซถ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 ๐ ๏ธ
these are the behind-the-scenes girlies, doing the actual work while the public API takes the credit ๐
void _M_cache_locale (const locale &__loc)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 ()template<typename _ValueT> __ostream_type & _M_insert (_ValueT __v)void _M_move (ios_base &) noexceptvoid _M_swap (ios_base &__rhs) noexceptvoid init (basic_streambuf< _CharT, _Traits > *__sb)โ All setup is performed here.void move (basic_ios &&__rhs)void move (basic_ios &__rhs)void set_rdbuf (basic_streambuf< _CharT, _Traits > *__sb)void swap (basic_ios &__rhs) noexceptvoid swap (basic_ostream &__rhs)
๐ซฃ Protected Attributes ๐ซฃ
_Callback_list * _M_callbacksconst __ctype_type * _M_ctypeiostate _M_exceptionchar_type _M_fillbool _M_fill_initfmtflags _M_flagslocale _M_ios_locale_Words _M_local_word [_S_local_word_size]const __num_get_type * _M_num_getconst __num_put_type * _M_num_putstreamsize _M_precisionbasic_streambuf< _CharT, _Traits > * _M_streambufiostate _M_streambuf_statebasic_ostream< _CharT, _Traits > * _M_tiestreamsize _M_width_Words * _M_wordint _M_word_size_Words _M_word_zero
๐ Detailed Description ๐
template<typename _CharT, typename _Traits>
class std::basic_ofstream< _CharT, _Traits >
"Controlling output for files." โ that's the whole vibe, bestie, it writes stuff to files, periodt ๐
Template Parameters
_CharTโ Type of character stream._Traitsโ Traits for character type, defaults tochar_traits<_CharT>.
This class supports reading from named files, using the inherited functions from std::basic_ostream. To control the associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb. ๐ฆ
๐งฌ Member Typedef Documentation ๐งฌ
__num_get_type
template<typename _CharT, typename _Traits> typedef num_get<_CharT,
istreambuf_iterator<_CharT, _Traits> > std::basic_ios< _CharT, _Traits
>::__num_get_type [inherited]
These are non-standard types. (yes, they said it themselves, not me ๐)
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 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().
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:
boolalphadecfixedhexinternalleftoctrightscientificshowbaseshowpointshowposskipwsunitbufuppercaseadjustfieldbasefieldfloatfield
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:
badbiteofbitfailbitgoodbit
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:
appatebinaryinouttrunc
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:
begcur, equivalent toSEEK_CURin the C standard library.end, equivalent toSEEK_ENDin 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_ofstream ()
template<typename _CharT, typename _Traits> std::basic_ofstream< _CharT,
_Traits >::basic_ofstream () [inline]
Default constructor. Initializes sb using its default constructor, and passes &sb to the base class initializer. Does not open any files (you haven't given it a filename to open, so likeโฆ what did you expect bestie ๐ญ).
basic_ofstream (const char * __s, ios_base::openmode __mode = ios_base::out)
template<typename _CharT, typename _Traits> std::basic_ofstream< _CharT,
_Traits >::basic_ofstream (const char * __s, ios_base::openmode __mode =
ios_base::out) [inline], [explicit]
Create an output file stream. ๐ฆ
Parameters
__sโ Null terminated string specifying the filename.__modeโ Open file in specified mode (seestd::ios_base).
ios_base::out is automatically included in __mode.
basic_ofstream (const std::string & __s, ios_base::openmode __mode = ios_base::out)
template<typename _CharT, typename _Traits> std::basic_ofstream< _CharT,
_Traits >::basic_ofstream (const std::string & __s, ios_base::openmode
__mode = ios_base::out) [inline], [explicit]
Create an output file stream. ๐ฆ
Parameters
__sโstd::stringspecifying the filename.__modeโ Open file in specified mode (seestd::ios_base).
ios_base::out is automatically included in __mode.
basic_ofstream (const _Path & __s, ios_base::openmode __mode = ios_base::out)
template<typename _CharT, typename _Traits> template<typename _Path,
typename _Require = _If_fs_path<_Path>> std::basic_ofstream< _CharT,
_Traits >::basic_ofstream (const _Path & __s, ios_base::openmode __mode
= ios_base::out) [inline]
Create an output file stream. ๐ฆ
Parameters
__sโfilesystem::pathspecifying the filename.__modeโ Open file in specified mode (seestd::ios_base).
ios_base::out is automatically included in __mode.
~basic_ofstream ()
template<typename _CharT, typename _Traits> std::basic_ofstream< _CharT,
_Traits >::~basic_ofstream () [inline]
The destructor does nothing. The file is closed by the filebuf object, not the formatting stream. (iconic delegation honestly ๐)
๐ 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::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().
bad ()
template<typename _CharT, typename _Traits> bool std::basic_ios< _CharT,
_Traits >::bad () const [inline], [nodiscard], [inherited]
Fast error checking. โก
Returns
True if the badbit is set.
heads up bestie: otheriostateflags may also be set. don't assumebad()being true means nothing else is going on ๐
- Referenced by
std::basic_ostream< _CharT, _Traits >::sentry::sentry().
clear โ [Re]sets the error state ๐
template<typename _CharT, typename _Traits> void std::basic_ios< _CharT, _Traits >::clear (iostate __state = goodbit) [inherited]
Okay so this one resets the error state. Yes bestie, resets. It's the little broom that sweeps your stream's drama away. โจ
- Parameters
__stateโ the new state flag(s) to set. Like, what you wanna set it to.
Peep std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument โ fr, the default goodbit does the thing.
References: std::ios_base::badbit, exceptions(), rdbuf(), and rdstate().
Referenced by: std::basic_ios< char_type, traits_type >::exceptions(), 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::__detail::operator>>(), std::basic_istream< _CharT, _Traits >::putback(), rdbuf(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ios< char_type, traits_type >::setstate(), and std::basic_istream< _CharT, _Traits >::unget().
close โ shutting the file, bye bestie ๐
template<typename _CharT, typename _Traits> void std::basic_ofstream< _CharT, _Traits >::close () [inline]
Close the file. That's it, that's the whole vibe. It calls std::basic_filebuf::close(). And if that function fails? failbit gets set in the stream's error state. Noted. ๐
copyfmt โ copy-paste but make it stream โจ
template<typename _CharT, typename _Traits> basic_ios< _CharT, _Traits > & std::basic_ios< _CharT, _Traits >::copyfmt (const basic_ios< _CharT, _Traits > & __rhs) [inherited]
Copies fields of __rhs into this. It's giving "be like your bestie" energy.
- Parameters
__rhsโ the source values for the copies.
- Returns
- A reference to this object. ๐ซถ
So the tea is: all fields of __rhs are copied into this object, EXCEPT that rdbuf() and rdstate() stay exactly how they were. Untouched. Iconic. All values in the pword and iword arrays get copied too.
Before copying, every callback is invoked with erase_event. After copying, each (new) callback gets invoked with copyfmt_event. And the grand finale? Copying exceptions(). ๐
References: basic_ios(), std::__addressof(), exceptions(), fill(), std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), tie(), std::tie(), and std::ios_base::width().
eof โ fast error checking, part one ๐โโ๏ธ
template<typename _CharT, typename _Traits> bool std::basic_ios< _CharT, _Traits >::eof () const [inline], [nodiscard], [inherited]
- Returns
trueif theeofbitis set.
Heads up bestie: other iostate flags may also be set. Don't assume it's just the one. ๐
exceptions (the const one) โ mask reveal ๐
template<typename _CharT, typename _Traits> iostate std::basic_ios< _CharT, _Traits >::exceptions () const [inline], [nodiscard], [inherited]
Throwing exceptions on errors. Spicy. ๐ถ๏ธ
- Returns
- The current exceptions mask.
This changes nothing in the stream โ it's purely a read, no cap. See the one-argument version of exceptions(iostate) for the meaning of the return value, because that's where the actual lore lives.
Referenced by: clear(), and copyfmt().
exceptions (the iostate one) โ now we're throwing hands ๐ค
template<typename _CharT, typename _Traits> void std::basic_ios< _CharT, _Traits >::exceptions (iostate __except) [inline], [inherited]
Throwing exceptions on errors, but this time you're the one setting the rules.
- Parameters
__exceptโ the new exceptions mask.
By default, error flags are set silently. So chill. But 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. ๐จ
And here's the part that gets you: if the error flag is already set when the exceptions mask is added, the exception is thrown immediately. No waiting, no build-up. 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);
}
fail โ fast error checking, part two ๐
template<typename _CharT, typename _Traits> bool std::basic_ios< _CharT, _Traits >::fail () const [inline], [nodiscard], [inherited]
- Returns
trueif either thebadbitor thefailbitis set.
Checking the badbit in fail() is historical practice โ it's a legacy thing, it's grandfathered in, we don't question it. And again: other iostate flags may also be set. ๐
Referenced by: std::basic_ios< char_type, traits_type >::operator bool(), std::basic_ios< char_type, traits_type >::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(), and std::basic_ostream< _CharT, _Traits >::tellp().
fill (the getter) โ what's the empty character, bestie? ๐ธ
template<typename _CharT, typename _Traits> char_type std::basic_ios< _CharT, _Traits >::fill () const [inline], [nodiscard], [inherited]
Retrieves the empty character. The filler. The padding icon. โจ
- Returns
- The current fill character.
It defaults to a space (' ') in the current locale. Classic.
Referenced by: copyfmt(), and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<.
fill (the setter) โ new filler just dropped ๐
template<typename _CharT, typename _Traits> char_type std::basic_ios< _CharT, _Traits >::fill (char_type __ch) [inline], [inherited]
Sets a new empty character. Glow up for your padding.
- Parameters
__chโ the new character.
- Returns
- The previous fill character. So you can always swap back, we love a reversible queen. ๐
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. And yeah โ it defaults to a space (' ') in the current locale.
flags (the const one) โ format flag peek ๐
fmtflags std::ios_base::flags () const [inline], [nodiscard], [inherited]
Access to format flags. The whole control panel, for input and output.
- Returns
- The format control flags for both input and output.
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>>(), std::operator>>(), and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>.
flags (the setter) โ all at once, no crumbs ๐ค
fmtflags std::ios_base::flags (fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once. It's a full send.
- Parameters
__fmtflโ the new flags to set.
- Returns
- The previous format control flags.
This function overwrites all the format flags with __fmtfl. Every single one. So likeโฆ know what you're doing before you do it. ๐
flush</flush>` โ synchronizing the stream buffer ๐ฆ
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::flush () [inherited]
Synchronizing the stream buffer. Get it all out, bestie.
- Returns
*this
If rdbuf() is a null pointer, changes nothing. Nothing to flush, nothing to see. If it is a real pointer? It calls rdbuf()->pubsync(), and if that returns -1, sets badbit. ๐ญ
References: std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
Referenced by: std::flush().
getloc โ locale access, who are you today? ๐
locale std::ios_base::getloc () const [inline], [nodiscard], [inherited]
Locale access. Asking the stream "so what locale are we in rn?"
- 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. So if you never set one, you get the default. Simple as. โจ
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().
good โ fast error checking, the final boss โญ
template<typename _CharT, typename _Traits> bool std::basic_ios< _CharT, _Traits >::good () const [inline], [nodiscard], [inherited]
- Returns
trueif no error flags are set.
A wrapper around rdstate. She's a vibe check, basically. ๐ฆ
Referenced by: std::basic_istream< _CharT, _Traits >::sentry::sentry(), std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::__detail::operator>>().
imbue โ moving to a new locale, we're relocating ๐งณ
template<typename _CharT, typename _Traits> locale std::basic_ios< _CharT, _Traits >::imbue (const locale & __loc) [inherited]
Moves to a new locale. New city, new energy. ๐
- 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). Both of them. Everybody gets the memo. ๐ฌ
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
References: std::ios_base::getloc(), std::ios_base::imbue(), and rdbuf().
Referenced by: std::chrono::operator<<().
init โ the protected setup arc ๐
template<typename _CharT, typename _Traits> void std::basic_ios< _CharT, _Traits >::init (basic_streambuf< _CharT, _Traits > * __sb) [protected], [inherited]
All setup is performed here. That's the whole job. It's called from the public constructor, it is not virtual, and it cannot be redefined. So don't try it, bestie, it's not that kind of function. ๐
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_ios< char_type, traits_type >::basic_ios(), std::basic_istream< char_type, traits_type >::basic_istream(), std::basic_istringstream< char >::basic_istringstream(), std::basic_istringstream< char >::basic_istringstream(), std::basic_istringstream< char >::basic_istringstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ofstream< char >::basic_ofstream(), std::basic_ostream< char_type, traits_type >::basic_ostream(), std::basic_ostringstream< char >::basic_ostringstream(), std::basic_ostringstream< char >::basic_ostringstream(), std::basic_ostringstream< char >::basic_ostringstream(), std::basic_stringstream< char >::basic_stringstream(), std::basic_stringstream< char >::basic_stringstream(), and std::basic_stringstream< char >::basic_stringstream().
is_open โ is the file actually open tho? ๐คจ
template<typename _CharT, typename _Traits> bool std::basic_ofstream< _CharT, _Traits >::is_open () [inline], [nodiscard]
Wrapper to test for an open file. A little middleman, doing a little check-in. ๐ซถ
- Returns
rdbuf()->is_open()
That's it. That's the return. Straight from the buffer's mouth.
iword โ access to the integer array ๐ข
long & std::ios_base::iword (int __ix) [inline], [inherited]
Access to integer array. A little stash of integers you can do whatever you want with. Iconic, honestly.
- 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. โจ
Important though: 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. It can move on you. Don't get attached. ๐ญ
References: iword().
Referenced by: iword().
narrow โ squeezes characters ๐
template<typename _CharT, typename _Traits> char std::basic_ios< _CharT,
_Traits >::narrow (char_type __c, char __dfault) const [inline],
[inherited]
Okay so bestie, this one squeezes characters. It maps a character of char_type to a character of char, if possible.
Parameters
__cโ The character to narrow.__dfaultโ The character to narrow.
Returns
- The narrowed character.
It returns the result of
std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html โ go read them, they're giving localization realness. โจ
open (filesystem::path flavor) ๐ฆ
template<typename _CharT, typename _Traits> template<typename _Path>
_If_fs_path< _Path, void > std::basic_ofstream< _CharT, _Traits >::open
(const _Path & __s, ios_base::openmode __mode = ios_base::out) [inline]
Opens an external file. (Not me opening my DMs, but close.)
Parameters
__sโ The name of the file, as afilesystem::path.__modeโ The open mode flags.
Calls std::basic_filebuf::open(__s,__mode|out). If that function fails, failbit is set in the stream's error state. No cap. ๐
open (const char* flavor) ๐ฅ
template<typename _CharT, typename _Traits> void std::basic_ofstream<
_CharT, _Traits >::open (const char * __s, ios_base::openmode __mode =
ios_base::out) [inline]
Opens an external file.
Parameters
__sโ The name of the file.__modeโ The open mode flags.
Calls std::basic_filebuf::open(__s,__mode|out). If that function fails, failbit is set in the stream's error state.
Referenced by std::basic_ofstream< char >::basic_ofstream(), std::basic_ofstream< char >::basic_ofstream(), and std::basic_ofstream< char >::open(). Okay so it's popular, periodt.
open (std::string flavor) ๐
template<typename _CharT, typename _Traits> void std::basic_ofstream<
_CharT, _Traits >::open (const std::string & __s, ios_base::openmode
__mode = ios_base::out) [inline]
Opens an external file.
Parameters
__sโ The name of the file.__modeโ The open mode flags.
Calls std::basic_filebuf::open(s,mode|out). If that function fails, failbit is set in the stream's error state.
operator bool โ the quick-and-easy status check ๐
template<typename _CharT, typename _Traits> std::basic_ios< _CharT, _Traits
>::operator bool () const [inline], [explicit], [nodiscard],
[inherited]
The quick-and-easy status check. This allows you to write constructs such as if (!a_stream) ... and while (a_stream) .... It's giving main character energy. โจ
operator! โ also the quick-and-easy status check ๐
template<typename _CharT, typename _Traits> bool std::basic_ios< _CharT,
_Traits >::operator! () const [inline], [nodiscard], [inherited]
The quick-and-easy status check. This allows you to write constructs such as if (!a_stream) ... and while (a_stream) .... Same vibe, different operator. ๐
operator<< for manipulators (the __ios_type one) ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (__ios_type &(* __pf
)(__ios_type &)) [inline], [inherited]
Interface for manipulators. Manipulators such as std::endl and std::hex use these functions in constructs like "std::cout << std::endl". For more information, see the iomanip header. Iconic.
operator<< for manipulators (the __ostream_type one) ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (__ostream_type &(*
__pf )(__ostream_type &)) [inline], [inherited]
Interface for manipulators. Manipulators such as std::endl and std::hex use these functions in constructs like "std::cout << std::endl". For more information, see the iomanip header. Twinning. ๐ฏ
operator<< from another streambuf ๐ฆ
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >
& std::basic_ostream< _CharT, _Traits >::operator<< (__streambuf_type *
__sb) [inherited]
Extracting from another streambuf.
Parameters
__sbโ A pointer to a streambuf
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into *this until one of the following occurs:
- the input stream reaches end-of-file,
- insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted), or
- an exception occurs while getting a character from
__sb, which setsfailbitin the error state
If the function inserts no characters, failbit is set. So basically, no characters, no peace. ๐ญ
operator<< (bool) โ integer arithmetic inserters ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (bool __n) [inline],
[inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting. So fancy. ๐
operator<< (const void*) โ pointer arithmetic inserters โจ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (const void * __p)
[inline], [inherited]
Pointer arithmetic inserters.
Parameters
__pโ A variable of pointer type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (double) โ floating point arithmetic inserters ๐ฅ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (double __f) [inline],
[inherited]
Floating point arithmetic inserters.
Parameters
__fโ A variable of builtin floating point type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (float) โ floating point arithmetic inserters ๐ธ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (float __f) [inline],
[inherited]
Floating point arithmetic inserters.
Parameters
__fโ A variable of builtin floating point type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (int) โ integer arithmetic inserters ๐
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >
& std::basic_ostream< _CharT, _Traits >::operator<< (int __n)
[inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< for manipulators (the ios_base one) ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (ios_base &(* __pf
)(ios_base &)) [inline], [inherited]
Interface for manipulators. Manipulators such as std::endl and std::hex use these functions in constructs like "std::cout << std::endl". For more information, see the iomanip header.
operator<< (long) โ integer arithmetic inserters ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (long __n) [inline],
[inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (long double) โ floating point arithmetic inserters ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (long double __f)
[inline], [inherited]
Floating point arithmetic inserters.
Parameters
__fโ A variable of builtin floating point type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (long long) โ integer arithmetic inserters ๐ฆ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (long long __n)
[inline], [inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (short) โ integer arithmetic inserters ๐
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >
& std::basic_ostream< _CharT, _Traits >::operator<< (short __n)
[inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References basic_ostream(), std::ios_base::badbit, std::ostreambuf_iterator< _CharT, _Traits >::failed(), std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::setstate(), and std::use_facet(). Okay so it's got receipts. ๐งพ
operator<< (unsigned int) โ integer arithmetic inserters โจ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (unsigned int __n)
[inline], [inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (unsigned long) โ integer arithmetic inserters ๐ฅ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (unsigned long __n)
[inline], [inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (unsigned long long) โ integer arithmetic inserters ๐ธ
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (unsigned long long
__n) [inline], [inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<< (unsigned short) โ integer arithmetic inserters ๐
template<typename _CharT, typename _Traits> __ostream_type &
std::basic_ostream< _CharT, _Traits >::operator<< (unsigned short __n)
[inline], [inherited]
Integer arithmetic inserters.
Parameters
__nโ A variable of builtin integral type.
Returns
*thisif successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
precision() โ flags access ๐
streamsize std::ios_base::precision () const [inline], [nodiscard],
[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. (Not me giving definitions without checking DR 189. ๐)
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), and std::chrono::operator<<().
precision(streamsize) โ changing flags ๐
streamsize std::ios_base::precision (streamsize __prec) [inline],
[inherited]
Changing flags.
Parameters
__precโ The new precision value.
Returns
- The previous value of
precision().
put โ simple insertion ๐
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >
& std::basic_ostream< _CharT, _Traits >::put (char_type __c) [inherited]
Simple insertion. That's it. That's the whole vibe. ๐
Parameters
__cโ The character to insert.
Returns *this
Tries to insert __c.
Note: This function is not overloaded onsigned charandunsigned char.
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
Referenced by std::endl(), and std::ends().
๐ void *& std::ios_base::pword (int __ix) [inline], [inherited] ๐
Access to 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. So don't get too attached, bestie. ๐
๐ธ 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>
References clear().
๐ฆ template<typename _CharT, typename _Traits> __filebuf_type * std::basic_ofstream< _CharT, _Traits >::rdbuf () const [inline], [nodiscard] ๐ฆ
Accessing the underlying buffer.
Returns The current basic_filebuf buffer.
This hides both signatures of std::basic_ios::rdbuf().
โจ template<typename _CharT, typename _Traits> iostate std::basic_ios< _CharT, _Traits >::rdstate () const [inline], [nodiscard], [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().
Referenced by std::basic_ios< char_type, traits_type >::bad(), clear(), std::basic_ios< char_type, traits_type >::eof(), std::basic_ios< char_type, traits_type >::fail(), std::basic_ios< char_type, traits_type >::good(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_ios< char_type, traits_type >::setstate(), and std::basic_istream< _CharT, _Traits >::unget().
๐ void std::ios_base::register_callback (event_callback __fn, int __index) [inherited] ๐
Add the callback __fn with parameter __index.
Parameters
__fnโ The function to add.__indexโ The integer to pass to the function when invoked.
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
๐ template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp (off_type __off, ios_base::seekdir __dir) [inherited] ๐
Changing the current write position.
Parameters
__offโ A file offset object.__dirโ The direction in which to seek.
Returns *this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
๐ template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp (pos_type __pos) [inherited] ๐
Changing the current write position.
Parameters
__posโ A file position object.
Returns *this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
โญ fmtflags std::ios_base::setf (fmtflags __fmtfl) [inline], [inherited] โญ
Setting new format flags.
Parameters
__fmtflโ Additional flags to set.
Returns The previous format control flags.
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
๐ซ fmtflags std::ios_base::setf (fmtflags __fmtfl, fmtflags __mask) [inline], [inherited] ๐ซ
Setting new format flags.
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.
๐ฅ template<typename _CharT, typename _Traits> void std::basic_ios< _CharT, _Traits >::setstate (iostate __state) [inline], [inherited] ๐ฅ
Sets additional flags in the error state.
Parameters
__stateโ The additional state flag(s) to set.
See std::ios_base::iostate for the possible bit values.
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::basic_ostream< _CharT, _Traits >::flush(), std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::get(), std::getline(), std::getline(), 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::basic_ostream< _CharT, _Traits >::operator<<(), std::operator<<(), std::operator<<(), std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::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< _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().
๐ bool std::ios_base::sync_with_stdio (bool __sync = true) [static], [inherited] ๐
Interaction with the standard C I/O objects.
Parameters
__syncโ Whether to synchronize or not.
Returns True if the standard streams were previously synchronized.
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the standard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
๐ template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >::pos_type std::basic_ostream< _CharT, _Traits >::tellp () [inherited] ๐
Getting the current write position.
Returns A file position object.
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf().
๐ซถ template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie () const [inline], [nodiscard], [inherited] ๐ซถ
Fetches the current tied stream.
Returns A pointer to the tied stream, or NULL if the stream is not tied.
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and copyfmt().
๐ template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > * std::basic_ios< _CharT, _Traits >::tie (basic_ostream< _CharT, _Traits > * __tiestr) [inline], [inherited] ๐
Ties this stream to an output stream.
Parameters
__tiestrโ The output stream.
Returns The previously tied output stream, or NULL if the stream was not tied.
This sets up a new tie; see tie() for more.
๐
void std::ios_base::unsetf (fmtflags __mask) [inline], [inherited] ๐
Clearing format flags.
Parameters
__maskโ The flags to unset.
This function clears __mask in the format flags.
๐ธ template<typename _CharT, typename _Traits> char_type std::basic_ios< _CharT, _Traits >::widen (char __c) const [inline], [inherited] ๐ธ
Widens characters.
Parameters
__cโ The character to widen.
Returns The widened character.
Maps a character of char to a character of char_type.
Returns the result of
std::use_facet<ctype<char_type> >(getloc()).widen(c)
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
Referenced by std::endl(), std::basic_ios< char_type, traits_type >::fill(), std::basic_istream< char_type, traits_type >::get(), std::basic_istream< char_type, traits_type >::get(), std::basic_istream< char_type, traits_type >::getline(), std::getline(), std::getline(), std::operator<<(), std::operator<<(), std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<, and std::tr2::operator>>().
โจ streamsize std::ios_base::width () const [inline], [nodiscard], [inherited] โจ
Flags access.
Returns The minimum field width to generate on output operations.
Minimum field width refers to the number of characters.
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], [inherited] ๐ฆ
Changing flags.
Parameters
__wideโ The new width value.
Returns: the previous value of width(). ๐
write โ character string insertion ๐
template<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits >
& std::basic_ostream< _CharT, _Traits >::write (const char_type * __s,
streamsize __n) [inherited]
okay so this one is the character string insertion girly. she takes your characters and puts them into the stream. very straightforward, very demure.
Parameters
__sโ the array to insert, bestie.__nโ maximum number of characters to insert.
Returns โ *this ๐ซถ
here's the tea: characters get copied from __s and inserted into the stream until one of these things happens:
__ncharacters are inserted โจ- inserting into the output sequence fails โ and in that case,
badbitwill be set in the stream's error state ๐
Note: this function is not overloaded onsigned charandunsigned char. like, at all. periodt.
xalloc โ access to unique indices ๐
int std::ios_base::xalloc () [static], [inherited]
Returns โ an integer different from all previous calls.
so this function returns a unique integer every single time you call it. you can use it for literally anything, but it's 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. no drama, no collisions. ๐ง
the implementation keeps a static variable that gets incremented and returned on each invocation. xalloc is guaranteed to return an index that's safe to use in the iword and pword arrays. it's giving reliable. ๐
๐ Member Data Documentation ๐
these are the iconic static constants, the main characters of ios_base. buckle up bestie, there's a lot of them, and every single one comes with receipts (aka the "Referenced by" list, which we are keeping in full because we don't skip content around here). ๐
std::ios_base::adjustfield ๐ธ
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().
std::ios_base::app ๐
const openmode std::ios_base::app [static], [inherited]
seek to end before each write. every single write. she's thorough like that. โจ
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().
std::ios_base::ate ๐ฆ
const openmode std::ios_base::ate [static], [inherited]
open and seek to end immediately after opening. not before each write โ that's app's job. ate just does it once, right at the open. ๐ซ
Referenced by std::basic_filebuf< _CharT, _Traits >::open().
std::ios_base::badbit ๐
const iostate std::ios_base::badbit [static], [inherited]
indicates a loss of integrity in an input or output sequence (like, say, an irrecoverable read error from a file). this is the "something is genuinely 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().
std::ios_base::basefield ๐
const fmtflags std::ios_base::basefield [static], [inherited]
a mask of dec|oct|hex. useful for the 2-arg form of setf. pick your base, bestie. ๐ข
Referenced by std::dec(), std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), std::hex(), and std::oct().
std::ios_base::beg โญ
const seekdir std::ios_base::beg [static], [inherited]
request a seek relative to the beginning of the stream. home base. ๐
Referenced by std::basic_filebuf< _CharT, _Traits >::seekpos().
std::ios_base::binary ๐
const openmode std::ios_base::binary [static], [inherited]
perform input and output in binary mode (as opposed to text mode). and listen โ this is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary. read the docs before you assume, i'm begging. ๐
Referenced by std::basic_filebuf< _CharT, _Traits >::showmanyc().
std::ios_base::boolalpha โจ
const fmtflags std::ios_base::boolalpha [static], [inherited]
insert/extract bool in alphabetic rather than numeric format. so true/false instead of 1/0. so much more readable, no cap. ๐
Referenced by std::boolalpha(), std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), and std::noboolalpha().
std::ios_base::cur ๐ฆ
const seekdir std::ios_base::cur [static], [inherited]
request a seek relative to the current position within the sequence. right here, right now energy. ๐
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().
std::ios_base::dec ๐ข
const fmtflags std::ios_base::dec [static], [inherited]
converts integer input or generates integer output in decimal base. base 10 supremacy, sorry not sorry. ๐
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>>.
std::ios_base::end ๐ธ
const seekdir std::ios_base::end [static], [inherited]
request a seek relative to the current end of the sequence. go to the back of the line. ๐ช
Referenced by std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff().
std::ios_base::eofbit ๐ซถ
const iostate std::ios_base::eofbit [static], [inherited]
indicates that an input operation reached the end of an input sequence. we ran out of characters, bestie, that's it, that's the whole thing. ๐ญ
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().
std::ios_base::failbit ๐
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. like, the vibes were off. the operation didn't crash and burn, but it also didn't do the thing. ๐
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().
std::ios_base::fixed ๐
const fmtflags std::ios_base::fixed [static], [inherited]
generate floating-point output in fixed-point notation. that's it, that's the tweet. โจ
Referenced by std::fixed(), and std::hexfloat().
std::ios_base::floatfield ๐
const fmtflags std::ios_base::floatfield [static], [inherited]
a mask of scientific|fixed. useful for the 2-arg form of setf. float girls, this one's for you. ๐
Referenced by std::defaultfloat(), std::fixed(), std::hexfloat(), and std::scientific().
std::ios_base::goodbit ๐
const iostate std::ios_base::goodbit [static], [inherited]
indicates all is well. zero error flags set. the stream is thriving, hydrated, moisturized, in her lane, focused, flourishing. ๐
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().
std::ios_base::hex ๐
const fmtflags std::ios_base::hex [static], [inherited]
converts integer input or generates integer output in hexadecimal base. base 16, the cool kid base. ๐ฅ
Referenced by std::num_get< _CharT, _InIter >::do_get(), std::num_put< _CharT, _OutIter >::do_put(), and std::hex().
std::ios_base::in ๐ช
const openmode std::ios_base::in [static], [inherited]
open for input. default for ifstream and fstream. come on in, the water's fine. ๐ซถ
...and the roll call for the entry above keeps going, bestie, because this one is EVERYWHERE โ it's 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()std::basic_filebuf< _CharT, _Traits >::xsgetn()
const fmtflags std::ios_base::internal[static],[inherited]โ drops fill characters at a designated internal point in certain generated output. And if there's no such designated point? It's literally identical toright. That's the whole vibe, no cap. Referenced bystd::internal().const fmtflags std::ios_base::left[static],[inherited]โ adds fill characters on the right (the final positions) of certain generated output. I.e., the thing you print is flush left. Referenced bystd::num_put< _CharT, _OutIter >::do_put(),std::left(), andstd::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator<<.const fmtflags std::ios_base::oct[static],[inherited]โ converts integer input, or generates integer output, in octal base. Referenced bystd::oct().const openmode std::ios_base::out[static],[inherited]โ open for output. This is the default forofstreamandfstream. Referenced bystd::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(), andstd::basic_filebuf< _CharT, _Traits >::xsputn().const fmtflags std::ios_base::right[static],[inherited]โ adds fill characters on the left (the initial positions) of certain generated output. I.e., the thing you print is flush right. Referenced bystd::right().const fmtflags std::ios_base::scientific[static],[inherited]โ generates floating-point output in scientific notation. Referenced bystd::hexfloat(), andstd::scientific().const fmtflags std::ios_base::showbase[static],[inherited]โ generates a prefix indicating the numeric base of generated integer output. Referenced bystd::num_put< _CharT, _OutIter >::do_put(),std::noshowbase(), andstd::showbase().const fmtflags std::ios_base::showpoint[static],[inherited]โ generates a decimal-point character unconditionally in generated floating-point output. Referenced bystd::noshowpoint(), andstd::showpoint().const fmtflags std::ios_base::showpos[static],[inherited]โ generates a+sign in non-negative generated numeric output. Referenced bystd::noshowpos(), andstd::showpos().const fmtflags std::ios_base::skipws[static],[inherited]โ skips leading white space before certain input operations. Referenced bystd::noskipws(),std::__detail::operator>>(),std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>, andstd::skipws().const openmode std::ios_base::trunc[static],[inherited]โ truncate an existing stream when opening. This is the default forofstream.const fmtflags std::ios_base::unitbuf[static],[inherited]โ flushes output after each output operation. Referenced bystd::basic_ostream< _CharT, _Traits >::sentry::~sentry(),std::nounitbuf(), andstd::unitbuf().const fmtflags std::ios_base::uppercase[static],[inherited]โ replaces certain lowercase letters with their uppercase equivalents in generated output. Referenced bystd::num_put< _CharT, _OutIter >::do_put(),std::nouppercase(), andstd::uppercase().
๐ AUTHOR ๐
Generated automatically by Doxygen for libstdc++ from the source code.
Not a human, not a committee, not even a very caffeinated intern โ just Doxygen doing its little documentation thing off the source. Respect. ๐
aaaand that's a wrap on the whole std::basic... _Traits >(3) page, bestie!! ๐โจ this one's a libstdc++ original, and yeah, it was auto-generated by Doxygen for libstdc++ straight from the source code โ so if you ever need to cite it, that's your source and version right there in the footer, with its own date line doing its thing. go forth and stream responsibly. ๐ฆ๐
๐ฆ 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