std::deque::begin

iterator begin(); const_iterator begin() const; const_iterator cbegin() const; (since C++11) Returns an iterator to the first element of the container. If the container is empty, the returned iterator will be equal to end(). Parameters (none). Return value Iterator to the first element. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Example See also end cend returns an iterator to the end (publ

std::deque::back

reference back(); const_reference back() const; Returns reference to the last element in the container. Calling back on an empty container is undefined. Parameters (none). Return value Reference to the last element. Complexity Constant. Notes For a container c, the expression return c.back(); is equivalent to { auto tmp = c.end(); --tmp; return *tmp; } Example The following code uses back to display the last element of a std::deque<char>: #include <deque&g

std::deque::at

reference at( size_type pos ); const_reference at( size_type pos ) const; Returns a reference to the element at specified location pos, with bounds checking. If pos not within the range of the container, an exception of type std::out_of_range is thrown. Parameters pos - position of the element to return Return value Reference to the requested element. Exceptions std::out_of_range if !(pos < size()). Complexity Constant. See also operator[] acces

std::deque::assign

void assign( size_type count, const T& value ); (1) template< class InputIt > void assign( InputIt first, InputIt last ); (2) void assign( std::initializer_list<T> ilist ); (3) (since C++11) Replaces the contents of the container. 1) Replaces the contents with count copies of value value 2) Replaces the contents with copies of those in the range [first, last). This overload has the same effect as overload (1) if InputIt is an integral type. (until C++11) T

std::deque

Defined in header <deque> template< class T, class Allocator = std::allocator<T> > class deque; std::deque (double-ended queue) is an indexed sequence container that allows fast insertion and deletion at both its beginning and its end. In addition, insertion and deletion at either end of a deque never invalidates pointers or references to the rest of the elements. As opposed to std::vector, the elements of a deque are not stored contiguously: typical imp

std::defer_lock_t

Defined in header <mutex> struct defer_lock_t { }; (since C++11) struct try_to_lock_t { }; (since C++11) struct adopt_lock_t { }; (since C++11) std::defer_lock_t, std::try_to_lock_t and std::adopt_lock_t are empty struct tag types used to specify locking strategy for std::lock_guard, std::unique_lock and std::shared_lock. Type Effect(s) defer_lock_t do not acquire ownership of the mutex try_to_lock_t try to acquire ownership of the mutex without block

std::defer_lock

Defined in header <mutex> constexpr std::defer_lock_t defer_lock {}; (since C++11) constexpr std::try_to_lock_t try_to_lock {}; (since C++11) constexpr std::adopt_lock_t adopt_lock {}; (since C++11) std::defer_lock, std::try_to_lock and std::adopt_lock are instances of empty struct tag types std::defer_lock_t, std::try_to_lock_t and std::adopt_lock_t respectively. They are used to specify locking strategies for std::lock_guard and std::unique_lock. Type Effec

std::default_delete

Defined in header <memory> template< class T > struct default_delete (1) (since C++11) template< class T > struct default_delete<T[]> (2) (since C++11) std::default_delete is the default destruction policy used by std::unique_ptr when no deleter is specified. 1) The non-specialized default_delete uses delete to deallocate memory for a single object. 2) A partial specialization for array types that uses delete[] is also provided. Member functions

std::declval

Defined in header <utility> template< class T > typename std::add_rvalue_reference<T>::type declval(); (since C++11) Converts any type T to a reference type, making it possible to use member functions in decltype expressions without the need to go through constructors. declval is commonly used in templates where acceptable template parameters may have no constructor in common, but have the same member function whose return type is needed. Note that because no de

std::declare_reachable

Defined in header <memory> void declare_reachable( void* p ); (since C++11) Declares the object referenced by the pointer p reachable. Reachable objects will not be deleted by the garbage collector or considered to be a leak by a leak detector even if all pointers to it are destroyed. An object may be declared reachable multiple times, in which case multiple calls to std::undeclare_reachable would be needed to remove this property. For example, a XOR linked list needs to de