std::unordered_multiset::bucket_count

size_type bucket_count() const; (since C++11) Returns the number of buckets in the container. Parameters (none). Return value The number of buckets in the container. Complexity Constant. See also bucket_size returns the number of elements in specific bucket (public member function) max_bucket_count returns the maximum number of buckets (public member function)

std::free

Defined in header <cstdlib> void free( void* ptr ); Deallocates the space previously allocated by std::malloc(), std::calloc() or std::realloc(). If ptr is a null pointer, the function does nothing. The behavior is undefined if the value of ptr does not equal a value returned earlier by std::malloc(), std::calloc(), or std::realloc(). The behavior is undefined if the memory area referred to by ptr has already been deallocated, that is, std::free() or std::realloc() has alre

std::feclearexcept

Defined in header <cfenv> int feclearexcept( int excepts ); (since C++11) Attempts to clear the floating-point exceptions that are listed in the bitmask argument excepts, which is a bitwise OR of the floating point exception macros. Parameters excepts - bitmask listing the exception flags to clear Return value ​0​ if all indicated exceptions were successfully cleared or if excepts is zero. Returns a non-zero value on error. Example #include <iostream&g

std::shared_future::shared_future

shared_future(); (1) (since C++11) shared_future( const shared_future& other ); (2) (since C++11) shared_future( std::future<T>&& other ); (3) (since C++11) shared_future( shared_future&& other ); (4) (since C++11) Constructs a new shared_future. 1) Default constructor. Constructs an empty shared future, that doesn't refer to a shared state, that is valid() == false. 2) Constructs a shared future that refers to the same shared state, as othe

std::swap(std::thread)

void swap( thread &lhs, thread &rhs ); (since C++11) Overloads the std::swap algorithm for std::thread. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). Parameters lhs, rhs - threads whose states to swap Return value (none). Exceptions noexcept specification: noexcept Example #include <iostream> #include <thread> #include <chrono> void foo() { std::this_thread::sleep_for(std::chrono::seconds(1)); } vo

std::unordered_set::find

iterator find( const Key& key ); (1) const_iterator find( const Key& key ) const; (2) 1,2) Finds an element with key equivalent to key. Parameters key - key value of the element to search for Return value Iterator to an element with key equivalent to key. If no such element is found, past-the-end (see end()) iterator is returned. Complexity Constant on average, worst case linear in the size of the container. Example #include <iostream> #includ

std::unordered_map::reserve

void reserve( size_type count ); (since C++11) Sets the number of buckets to the number needed to accomodate at least count elements without exceeding maximum load factor and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. Effectively calls rehash(std::ceil(count / max_load_factor())). Parameters count - new capacity of the container Return value (none). Complexity Average case linear in the s

std::packaged_task::reset

void reset(); (since C++11) Resets the state abandoning the results of previous executions. New shared state is constructed. Equivalent to *this = packaged_task(std::move(f)), where f is the stored task. Parameters (none). Return value (none). Exceptions std::future_error if *this has no shared state. The error condition is set to no_state. std::bad_alloc if there was not enough memory for a new shared state. any exception thrown by the move constructor of the new package

std::max_align_t

Defined in header <cstddef> typedef /*implementation-defined*/ max_align_t; (since C++11) std::max_align_t is a POD type whose alignment requirement is at least as strict (as large) as that of every scalar type. Notes Pointers returned by allocation functions such as std::malloc are suitably aligned for any object, which means they are aligned at least as strict as std::max_align_t. std::max_align_t is usually synonymous with the largest scalar type, which is long double

std::char_traits::eq

(1) static bool eq( char_type a, char_type b ); (until C++11) static constexpr bool eq( char_type a, char_type b ); (since C++11) (2) static bool lt( char_type a, char_type b ); (until C++11) static constexpr bool lt( char_type a, char_type b ); (since C++11) Compares two characters. 1) Compares a and b for equality. 2) Compares a and b in such a way that they are totally ordered. For the char specialization, eq and lt are defined identically to the built-in operato