Namespace aliases

Namespace aliases allow the programmer to define an alternate name for a namespace. They are commonly used as a convenient shortcut for long or deeply-nested namespaces. Syntax namespace alias_name = ns_name; (1) namespace alias_name = ::ns_name; (2) namespace alias_name = nested_name::ns_name; (3) Explanation The new alias alias_name provides an alternate method of accessing ns_name. alias_name must be a name not previously used. alias_name is valid for the duration o

namespace

Usage namespace declaration namespace alias definition using-directives

Mutex

The Mutex concept extends the Lockable concept to include inter-thread synchronization. Requirements Lockable DefaultConstructible Destructible not copyable not movable For object m of Mutex type. The expression m.lock() has the following properties Behaves as an atomic operation. Blocks the calling thread until exclusive ownership of the mutex can be obtained. Prior m.unlock() operations on the same mutex synchronize-with this lock operation (equivalent to release-acquire

mutex

This header is part of the thread support library. Classes mutex (C++11) provides basic mutual exclusion facility (class) timed_mutex (C++11) provides mutual exclusion facility which implements locking with a timeout (class) recursive_mutex (C++11) provides mutual exclusion facility which can be locked recursively by the same thread (class) recursive_timed_mutex (C++11) provides mutual exclusion facility which can be locked recursively by the same thread and impl

MoveConstructible

Specifies that an instance of the type can be constructed from an rvalue argument. Requirements The type T satisfies MoveConstructible if. Given. rv, an rvalue expression of type T u, an arbitrary identifier The following expressions must be valid and have their specified effects. Expression Post-conditions T u = rv; The value of u is equivalent to the value of rv before the initialization. The new value of rv is unspecified. T(rv) The value of T(rv) is equivalent to the value

MoveInsertable

Specifies that an object of the type can be constructed into uninitialized storage from an rvalue of that type by a given allocator. Requirements The type T is MoveInsertable into the container X whose value_type is identical to T if, given. A an allocator type m an lvalue of type A p the pointer of type T* prepared by the container rv rvalue expression of type T where X::allocator_type is identical to std::allocator_traits<A>::rebind_alloc<T>, the following exp

MoveAssignable

Specifies that an instance of the type can be assigned from an rvalue argument. Requirements The type T satisfies MoveAssignable if. Given. t, a modifiable lvalue expression of type T rv, an rvalue expression of type T The following expressions must be valid and have their specified effects. Expression Return type Return value Post-conditions t = rv T& t The value of t is equivalent to the value of rv before the assignment. The new value of rv is unspecified. Notes Th

Move constructors

A move constructor of class T is a non-template constructor whose first parameter is T&&, const T&&, volatile T&&, or const volatile T&&, and either there are no other parameters, or the rest of the parameters all have default values. Syntax class_name ( class_name && ) (1) (since C++11) class_name ( class_name && ) = default; (2) (since C++11) class_name ( class_name && ) = delete; (3) (since C++11) Explanation

mutable

Usage mutable type specifier lambda-declarator that removes const qualification from parameters captured by copy (since C++11)

Move assignment operator

A move assignment operator of class T is a non-template non-static member function with the name operator= that takes exactly one parameter of type T&&, const T&&, volatile T&&, or const volatile T&&. Syntax class_name & class_name :: operator= ( class_name && ) (1) (since C++11) class_name & class_name :: operator= ( class_name && ) = default; (2) (since C++11) class_name & class_name :: operator= ( class_name &&am