std::ios_base::getloc

std::locale getloc() const; Returns the current locale associated with the stream. Parameters (none). Return value the locale object associated with the stream. Example #include <iostream> #include <ctime> #include <iomanip> #include <codecvt> int main() { std::wbuffer_convert<std::codecvt_utf8<wchar_t>> conv(std::cout.rdbuf()); std::wostream out(&conv); out.imbue(std::locale(out.getloc(), new s

std::ios_base::fmtflags

typedef /*implementation defined*/ fmtflags; static constexpr fmtflags dec = /*implementation defined*/ static constexpr fmtflags oct = /*implementation defined*/ static constexpr fmtflags hex = /*implementation defined*/ static constexpr fmtflags basefield = /*implementation defined (dec | oct | hex)*/ static constexpr fmtflags left = /*implementation defined*/ static constexpr fmtflags right = /*implementation defined*/ static constexpr fmtflags internal = /*implementation define

std::ios_base::flags

fmtflags flags() const; (1) fmtflags flags( fmtflags flags ); (2) Manages format flags. 1) returns current formatting setting. 2) replaces current settings with given ones. Parameters flags - new formatting setting. It can be a combination of the following constants: Constant Explanation dec use decimal base for integer I/O: see std::dec oct use octal base for integer I/O: see std::oct hex use hexadecimal base for integer I/O: see std::hex basefield dec|

std::ios_base::failure

Defined in header <ios> class failure; The class std::ios_base::failure defines an exception object that is thrown on failure by the functions in the Input/Output library. std::ios_base::failure may be defined either as a member class of std::ios_base or as a synonym (typedef) for another class with equivalent functionality. (since C++17). Inheritance diagram. (until C++11) Inheritance diagram. (since C++11) Member functions (constructor) constructs

std::ios_base::event_callback

typedef void (*event_callback)(event type, ios_base& ios, int index); The type of function callbacks that can be registered using register_callback() to be called on specific events. type is a value of type ios_base::event which indicates the type of the event that will invoke this callback. ios refers to the stream object for which the callback is invoked: *this is passed as the argument when callbacks are invoked by std::ios_base and std::basic_ios member functions. index is the u

std::ios_base::event

enum event; Specifies the event type which is passed to functions registered by register_callback() on specific events. The following constants are defined: Constant Explanation erase_event issued on ~ios_base() or basic_ios::copyfmt() (before the copy of members takes place) imbue_event issued on imbue() copyfmt_event issued on basic_ios::copyfmt() (after the copy of members takes place, but before the exception settings are copied) Example

std::ios_base

Defined in header <ios> class ios_base; The class ios_base is a multipurpose class that serves as the base class for all I/O stream classes. It maintains several kinds of data: 1) state information: stream status flags 2) control information: flags that control formatting of both input and output sequences and the imbued locale 3) private storage: indexed extensible data structure that allows both long and void* members, which may be implemented as two arbitrary-length a

std::iostream_category

Defined in header <ios> const std::error_category& iostream_category(); (since C++11) Obtains a reference to the static error category object for iostream errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "iostream". It is used to identify error codes provided in the exceptions of type std::ios_base::failure. Parameters (none). Return value A reference to the static object of unspecified runtim

std::invoke

Defined in header <functional> template< class F, class... ArgTypes> std::result_of_t<F&&(ArgTypes&&...)> invoke(F&& f, ArgTypes&&... args); (since C++17) Invoke the Callable object f with the parameters args. As by INVOKE(std::forward<F>(f), std::forward<Args>(args)...). where INVOKE(f, t1, t2, ..., tn) is defined as follows: if f is a pointer to member function of class T and t1 is an object of class T or reference

std::invalid_argument

Defined in header <stdexcept> class invalid_argument; Defines a type of object to be thrown as exception. It reports errors that arise because an argument value has not been accepted. This exception is thrown by std::bitset::bitset, and the std::stoi and std::stof families of functions. Inheritance diagram. Member functions (constructor) constructs the exception object (public member function) std::invalid_argument::invalid_argument explicit invalid_ar