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,

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::vector::get_allocator

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

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::condition_variable::wait_for

template< class Rep, class Period > std::cv_status wait_for( std::unique_lock<std::mutex>& lock, const std::chrono::duration<Rep, Period>& rel_time); (1) (since C++11) template< class Rep, class Period, class Predicate > bool wait_for( std::unique_lock<std::mutex>& lock, const std::chrono::duration<Rep, Period>& rel_time, Predicate pred); (2) (since C++11) 1) Atomically rele

std::nan

Defined in header <cmath> float nanf( const char* arg ); (since C++11) double nan( const char* arg ); (since C++11) long double nanl( const char* arg ); (since C++11) Converts the implementation-defined character string arg into the corresponding quiet NaN value, as if by calling std::strtod, std::strtof, or std::strtold, respectively, as follows: The call std::nan("string") is equivalent to the call std::strtod("NAN(string)", (char**)NULL);. The call std::nan("

std::geometric_distribution

Defined in header <random> template< class IntType = int > class geometric_distribution; (since C++11) Produces random non-negative integer values i, distributed according to discrete probability function: P(i|p) = p · (1 − p). i The value represents the number of yes/no trials (each succeeding with probability p) which are necessary to obtain a single success. std::geometric_distribution<>(p) is exactly equivalent to std::negative_binomial_distribution<

std::shared_mutex::lock

void lock(); (since C++17) Locks the mutex. If another thread has already locked the mutex, a call to lock will block execution until the lock is acquired. If lock is called by a thread that already owns the mutex in any mode (shared or exclusive), the behavior is undefined. Prior unlock() operation on the same mutex synchronizes-with (as defined in std::memory_order) this operation. Parameters (none). Return value (none). Exceptions Throws std::system_error when errors occur,

std::deque::max_size

size_type max_size() const; Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the largest container. Parameters (none). Return value Maximum number of elements. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Notes This value is typically equal to std::numeric_limits<size_type>::max(), and reflects the