std::swap(std::weak_ptr)

template< class T > void swap( weak_ptr<T>& lhs, weak_ptr<T>& rhs ); (since C++11) Specializes the std::swap algorithm for std::weak_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 contents (

std::lock

Defined in header <mutex> template< class Lockable1, class Lockable2, class... LockableN > void lock( Lockable1& lock1, Lockable2& lock2, LockableN&... lockn ); (since C++11) Locks the given Lockable objects lock1, lock2, ..., lockn using a deadlock avoidance algorithm to avoid deadlock. The objects are locked by an unspecified series of calls to lock, try_lock, unlock. If a call to lock or unlock results in an exception, unlock is called for any locked ob

std::pow(std::complex)

Defined in header <complex> template< class T > complex<T> pow( const complex<T>& x, const complex<T>& y); template< class T > complex<T> pow( const complex<T>& x, const T& y); template< class T > complex<T> pow( const T& x, const complex<T>& y); template< class T, class U > complex</*Promoted*/> pow( const complex<T>& x, const complex<U>& y);

Pseudo-random number generation

The random number library provides classes that generate random and pseudo-random numbers. These classes include: Random number engines (both pseudo-random number generators, which generate integer sequences with a uniform distribution, and true random number generators if available) Random number distributions (e.g. uniform, normal, or poisson distributions) which convert the output of random number engines into various statistical distributions Engines and distributions are designed to

std::scoped_allocator_adaptor

Defined in header <scoped_allocator> template< class OuterAlloc, class... InnerAlloc > class scoped_allocator_adaptor : public OuterAlloc; (since C++11) The std::scoped_allocator_adaptor class template is an allocator which can be used with multilevel containers (vector of sets of lists of tuples of maps, etc). It is instantiated with one outer allocator type OuterAlloc and zero or more inner allocator types InnerAlloc.... A container constructed directly with a scope

The rule of three/five/zero

Rule of three If a class requires a user-defined destructor, a user-defined copy constructor, or a user-defined copy assignment operator, it almost certainly requires all three. Because C++ copies and copy-assigns objects of user-defined types in various situations (passing/returning by value, manipulating a container, etc), these special member functions will be called, if accessible, and if they are not user-defined, they are implicitly-defined by the compiler. The implicitly-defined speci

std::tgamma

Defined in header <cmath> float tgamma( float arg ); (1) (since C++11) double tgamma( double arg ); (2) (since C++11) long double tgamma( long double arg ); (3) (since C++11) double tgamma( Integral arg ); (4) (since C++11) 1-3) Computes the gamma function of arg. 4) A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double). Parameters arg - value of a f

std::call_once

Defined in header <mutex> template< class Callable, class... Args > void call_once( std::once_flag& flag, Callable&& f, Args&&... args ); (since C++11) Executes the Callable object f exactly once, even if called from several threads. Each group of call_once invocations that receives the same std::once_flag object will meet the following requirements: Exactly one execution of exactly one of the functions (passed as f to the invocations in the group

std::exit

Defined in header <cstdlib> void exit( int exit_code ); (until C++11) [[noreturn]] void exit( int exit_code ); (since C++11) Causes normal program termination to occur. Several cleanup steps are performed: 1) destructors of objects with static storage duration are called in reverse order of completion of their constructors or the completion of their dynamic initialization, and the functions passed to std::atexit are called in reverse order they are regi

TriviallyCopyable

Requirements Trivial copy constructor Trivial move constructor Trivial copy assignment operator Trivial move assignment operator Trivial destructor No virtual functions or virtual base classes All (non-static) members and base classes are TriviallyCopyable Scalar types and arrays of TriviallyCopyable objects are TriviallyCopyable as well, as well as the const-qualified (but not volatile-qualified) versions of such types. See also is_trivially_copyable (C++11) checks if