std::partition_point

Defined in header <algorithm> template< class ForwardIt, class UnaryPredicate > ForwardIt partition_point( ForwardIt first, ForwardIt last, UnaryPredicate p ); (1) (since C++11) Examines the partitioned (as if by std::partition) range [first, last) and locates the end of the first partition, that is, the first element that does not satisfy p or last if all elements satisfy p. Parameters first, last - the partitioned range of elements to examine p - unary

std::locale::facet

Defined in header <locale> class locale::facet; std::locale::facet is the base class for facets. It provides a common base class so that locales could store pointers to the facets they implement in a single indexed container, and it abstracts support for facet reference counting. Whenever a facet is added to a locale, the locale increments the reference count in the facet (through an implementation-specific mechanism). Whenever a locale is destructed or modified, it decreme

std::condition_variable::wait

void wait( std::unique_lock<std::mutex>& lock ); (1) (since C++11) template< class Predicate > void wait( std::unique_lock<std::mutex>& lock, Predicate pred ); (2) (since C++11) wait causes the current thread to block until the condition variable is notified or a spurious wakeup occurs, optionally looping until some predicate is satisfied. 1) Atomically releases lock, blocks the current executing thread, and adds it to the list of threads waiting on *thi

std::stack::emplace

template< class... Args > void emplace( Args&&... args ); (since C++11) Pushes new element on top of the stack. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with exactly the same arguments as supplied to the function. Effectively calls c.emplace_back(std::forward<Args>(args)...). Parameters args - arguments to forward to the constructor of the element Return value (none).

std::weak_ptr::expired

bool expired() const; (since C++11) Checks whether the managed object has already been deleted. Equivalent to use_count() == 0. Parameters (none). Return value true if the managed object has already been deleted, false otherwise. Exceptions noexcept specification: noexcept Example Demonstrates how expired is used to check validity of the pointer. #include <iostream> #include <memory> std::weak_ptr<int> gw; void f() { if (!gw.expired()) {

Empty base optimization

Allows the size of an empty base subobject to be zero. Explanation The size of any object or member subobject is required to be at least 1 even if the type is an empty class type (that is, a class or struct that has no non-static data members), in order to be able to guarantee that the addresses of distinct objects of the same type are always distinct. However, base class subobjects are not so constrained, and can be completely optimized out from the object layout: #include <cassert>

std::future::future

future(); (1) (since C++11) future( future&& other ); (2) (since C++11) future( const future& other ) = delete; (3) (since C++11) Constructs a std::future object. 1) Default constructor. Constructs a std::future with no shared state. After construction, valid() == false. 2) Move constructor. Constructs a std::future with the shared state of other using move semantics. After construction, other.valid() == false. 3) std::future is not CopyConstructible. Parame

std::basic_string::begin

iterator begin(); const_iterator begin() const; const_iterator cbegin() const; (since C++11) Returns an iterator to the first character of the string. begin() returns a mutable or constant iterator, depending on the constness of *this. cbegin() always returns a constant iterator. It is equivalent to const_cast<const basic_string&>(*this).begin(). Parameters (none). Return value iterator to the first character. Exceptions (none) (until C++11) noexcept spec

std::piecewise_construct_t

Defined in header <utility> struct piecewise_construct_t { }; (since C++11) std::piecewise_construct_t is an empty struct tag type used to disambiguate between different functions that take two tuple arguments. The overloads that do not use std::piecewise_construct_t assume that each tuple argument becomes the element of a pair. The overloads that use std::piecewise_construct_t assume that each tuple argument is used to construct, piecewise, a new object of specified type,

enum

Usage declaration of an enumeration type