std::this_thread::get_id

Defined in header <thread> std::thread::id get_id(); (since C++11) Returns the id of the current thread. Parameters (none). Return value id of the current thread. Example #include <iostream> #include <thread> #include <chrono> #include <mutex> std::mutex g_display_mutex; void foo() { std::thread::id this_id = std::this_thread::get_id(); g_display_mutex.lock(); std::cout << "thread " << this_id << " sleep

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::error_category::default_error_condition

virtual std::error_condition default_error_condition( int code ) const; (since C++11) Returns the error condition for the given error code. Equivalent to std::error_condition(code, *this). Parameters code - error code for which to return error condition Return value The error condition for the given error code. Exceptions noexcept specification: noexcept

std::list::sort

void sort(); (1) template< class Compare > void sort( Compare comp ); (2) Sorts the elements in ascending order. The order of equal elements is preserved. The first version uses operator< to compare the elements, the second version uses the given comparison function comp. Parameters comp - comparison function object (i.e. an object that satisfies the requirements of Compare) which returns ​true if the first argument is less than (i.e. is ordered before) the secon

Object lifetime

Every object has a lifetime, which is a runtime property: for any object, there is a moment during the execution of a program when its lifetime begins, and there is a moment when it ends. For objects of class or aggregate types that are initialized by anything other than the trivial default constructor, lifetime begins when initialization ends. For objects of class types whose destructor is not trivial, lifetime ends when the execution of the destructor begins. For all other objects (class

std::basic_streambuf::sputn

std::streamsize sputn( const char_type* s, std::streamsize count ); (1) protected: virtual std::streamsize xsputn( const char_type* s, std::streamsize count ); (2) 1) Calls xsputn(s, count) of the most derived class. 2) Writes count characters to the output sequence from the character array whose first element is pointed to by s. The characters are written as if by repeated calls to sputc(). Writing stops when either count characters are written or a call to sputc() would have r

std::enable_if

Defined in header <type_traits> template< bool B, class T = void > struct enable_if; (since C++11) If B is true, std::enable_if has a public member typedef type, equal to T; otherwise, there is no member typedef. This metafunction is a convenient way to leverage SFINAE to conditionally remove functions from overload resolution based on type traits and to provide separate function overloads and specializations for different type traits. std::enable_if can be used as an

std::hash

Defined in header <string> template<> struct hash<std::string>; template<> struct hash<std::wstring>; template<> struct hash<std::u16string>; template<> struct hash<std::u32string>; (since C++11) The template specializations of std::hash for the various string classes allow users to obtain hashes of strings. Example The following code shows one possible output of a hash function used on a string: #include <iostream>

std::match_results::get_allocator

allocator_type get_allocator() const; (since C++11) Returns the allocator associated with the object. Parameters (none). Return value The associated allocator. Complexity Constant.

operators (std::dynarray)

template< class T > bool operator==( const dynarray<T>& lhs, const dynarray<T>& rhs ); (1) template< class T > bool operator!=( const dynarray<T>& lhs, const dynarray<T>& rhs ); (2) template< class T > bool operator<( const dynarray<T>& lhs, const dynarray<T>& rhs ); (3) template< class T > bool operator<=( const dynarray<T>& lh