std::ostrstream::ostrstream

ostrstream(); (1) ostrstream(char* s, int n, std::ios_base::openmode mode = std::ios_base::out); (2) Constructs new output strstream and its underlying std::strstreambuf. 1) Default-constructs the underlying std::strstreambuf, which creates a dynamically growing buffer, and initializes the base class with the address of the strstreambuf member. 2) Initialized the base class with the address of the underlying std::strstreambuf member, which is initialized in one of the two possib

std::vector::get_allocator

allocator_type get_allocator() const; Returns the allocator associated with the container. Parameters (none). Return value The associated allocator. Complexity Constant.

false

Usage boolean literal

std::iswcntrl

Defined in header <cwctype> int iswcntrl( std::wint_t ch ); Checks if the given wide character is a control character, i.e. codes 0x00-0x1F and 0x7F and any control characters specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is a control character, zero otherwise. Example #include <iostream> #include <cwctype> #include <clocale> int main() { wchar_t c = L'\u2028'; // t

nested classes

A declaration of a class/struct or union may appear in within another class. Such declaration declares a nested class. Explanation The name of the nested class exists in the scope of the enclosing class, and name lookup from a member function of a nested class visits the scope of the enclosing class after examining the scope of the nested class. As any member of its enclosing class, nested class has access to all names (private, protected, etc) to which the enclosing class has access, but it

Containers library

The Containers library is a generic collection of class templates and algorithms that allow programmers to easily implement common data structures like queues, lists and stacks. There are three classes of containers -- sequence containers, associative containers, and unordered associative containers -- each of which is designed to support a different set of operations. The container manages the storage space that is allocated for its elements and provides member functions to access them, either

std::swap(std::shared_ptr)

template< class T > void swap( shared_ptr<T>& lhs, shared_ptr<T>& rhs ); (since C++11) Specializes the std::swap algorithm for std::shared_ptr. Swaps the pointers of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - smart pointers whose contents to swap Return value (none). Exceptions noexcept specification: noexcept Complexity Constant. See also swap swaps the values of two objects (function template) swap swaps the cont

std::rotate

Defined in header <algorithm> template< class ForwardIt > void rotate( ForwardIt first, ForwardIt n_first, ForwardIt last ); (until C++11) template< class ForwardIt > ForwardIt rotate( ForwardIt first, ForwardIt n_first, ForwardIt last ); (since C++11) Performs a left rotation on a range of elements. Specifically, std::rotate swaps the elements in the range [first, last) in such a way that the element n_first becomes the first element of the new range and

std::unordered_map::insert_or_assign

template <class M> pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj); (1) (since C++17) template <class M> pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj); (2) (since C++17) template <class M> iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj); (3) (since C++17) template <class M> iterator insert_or_assign(const_iterator hint, key_type&& k,

MATH_ERRNO

Defined in header <cmath> #define MATH_ERRNO 1 (since C++11) #define MATH_ERREXCEPT 2 (since C++11) #define math_errhandling /*implementation defined*/ (since C++11) The macro constant math_errhandling expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT). The value of math_errhandling indicates the type of error handling that is performed by the