std::ios_base::xalloc

static int xalloc(); Returns a unique (program-wide) index value that can be used to access one long and one void* elements in the private storage of std::ios_base by calling iword() and pword(). The call to xalloc does not allocate memory. This function is thread-safe; concurrent access by multiple threads does not result in a data race. (since C++14). Effectively increments a private static data member of std::ios_base, as if by executing return index++;, if index is the name of that

Overload resolution

In order to compile a function call, the compiler must first perform name lookup, which, for functions, may involve argument-dependent lookup, and for function templates may be followed by template argument deduction. If these steps produce more than one candidate function, then overload resolution is performed to select the function that will actually be called. In general, the candidate function whose parameters match the arguments most closely is the one that is called. Details Before ove

std::wbuffer_convert

Defined in header <locale> template<class Codecvt, class Elem = wchar_t, class Tr = std::char_traits<Elem> > class wbuffer_convert : public std::basic_streambuf<Elem, Tr> (since C++11) std::wbuffer_convert is a wrapper over stream buffer of type std::basic_streambuf<char> which gives it the appearance of std::basic_streambuf<Elem>. All I/O performed through std::wbuffer_convert undergoes character conversion as defined by the

std::wstring_convert::to_bytes

Defined in header <locale> byte_string to_bytes( Elem wchar ); (1) byte_string to_bytes( const Elem* wptr ); (2) byte_string to_bytes( const wide_string& wstr ); (3) byte_string to_bytes( const Elem* first, const Elem* last); (4) Performs wide to multibyte conversion, using the codecvt facet supplied at construction. 1) Converts wchar as if it was a string of length 1, to byte_string. 2) Converts the null-terminated wide character sequence beginning

std::basic_ostringstream::swap

void swap( basic_ostringstream& other ); (since C++11) Exchanges the state of the stream with those of other. This is done by callingbasic_ostream<CharT, Traits>::swap(other) and rdbuf()->swap(*other.rdbuf()). Parameters other - stream to exchange the state with Return value (none). Example See also operator= (C++11) moves the string stream (public member function) swap (C++11) swaps two basic_stringbuf objects (public member function of st

sizeof operator

Queries size of the object or type. Used when actual size of the object must be known. Syntax sizeof( type ) (1) sizeof expression (2) Both versions return a constant of type std::size_t. Explanation 1) returns size in bytes of the object representation of type. 2) returns size in bytes of the object representation of the type, that would be returned by expression, if evaluated. Notes Depending on the computer architecture, a byte may consist of 8 or more bits, the exact

std::list

Defined in header <list> template< class T, class Allocator = std::allocator<T> > class list; std::list is a container that supports constant time insertion and removal of elements from anywhere in the container. Fast random access is not supported. It is usually implemented as a doubly-linked list. Compared to std::forward_list this container provides bidirectional iteration capability while being less space efficient. Addition, removal and moving the e

std::equal_range

Defined in header <algorithm> template< class ForwardIt, class T > std::pair<ForwardIt,ForwardIt> equal_range( ForwardIt first, ForwardIt last, const T& value ); (1) template< class ForwardIt, class T, class Compare > std::pair<ForwardIt,ForwardIt> equal_range( ForwardIt first, ForwardIt last, const T& value, Compare comp ); (2) Returns a range containing all elements equivalent to value in th

std::strtof

Defined in header <cstdlib> float strtof( const char* str, char** str_end ); (since C++11) double strtod( const char* str, char** str_end ); long double strtold( const char* str, char** str_end ); (since C++11) Interprets a floating point value in a byte string pointed to by str. Function discards any whitespace characters (as determined by std::isspace()) until first non-whitespace character is found. Then it takes as many characters as possible to f

Fundamental types

(See also type for type system overview and the list of type-related utilities that are provided by the C++ library). Void type void - type with an empty set of values. It is an incomplete type that cannot be completed (consequently, objects of type void are disallowed). There are no arrays of void, nor references to void. However, pointers to void and functions returning type void (procedures in other languages) are permitted. std::nullptr_t Boolean type bool - type, capable of