bsl::Deque_Base

This class describes the basic layout for a deque class. It is important that this class has the same layout as the deque class implementation. It is parameterized by VALUE_TYPE only and implements the portion of bsl::deque that does not need to know about its (template parameter) type ALLOCATOR (in order to generate shorter debug strings). Note that this class must have the same layout as Deque_Imp (see implementation file).

Synopsis

Declared in <bslstl_deque.h>

template<class VALUE_TYPE>
class Deque_Base;

Type Aliases

NameDescription
const_iterator This typedef is an alias for const_iterator.
const_reference This typedef is an alias for const_reference.
const_reverse_iterator This typedef is an alias to bsl::reverse_iterator<const_iterator>.
difference_type This typedef is an alias for difference_type.
iterator This typedef is an alias for iterator.
reference This typedef is an alias for reference.
reverse_iterator This typedef is an alias to bsl::reverse_iterator<iterator>.
size_type This typedef is an alias for size_type.
value_type This typedef is an alias for value_type.

Member Functions

NameDescription
at at overloads
back back overloads
begin begin overloads
capacity Return the sum of the current size of this deque plus the minimum number of push_front or push_back operations needed to invalidate iterators in this deque. Note that this method is not part of the C++ standard.
cbegin Return an iterator providing non-modifiable access to the first element in this deque, and the past-the-end iterator if this deque is empty.
cend Return the past-the-end (forward) iterator providing non-modifiable access to this deque.
crbegin Return a reverse iterator providing non-modifiable access to the last element in this deque, and the past-the-end reverse iterator if this deque is empty.
crend Return the past-the-end reverse iterator providing non-modifiable access to this deque.
empty Return true if this deque contains no elements, and false otherwise.
end end overloads
front front overloads
operator[] Subscript operators
rbegin rbegin overloads
rend rend overloads
size Return the number of elements contained by this deque.

Protected Data Members

NameDescription
d_blocksLength Length of the d_blocks_p array.
d_blocks_p Array of pointers to blocks (owned).
d_finish The d_finish data member.
d_start The d_start data member.

Derived Classes

NameDescription
deque This class template provides an STL-compliant deque that conforms to the bslma::Allocator model. For the requirements of a deque class, consult the C++11 standard. In particular, this implementation offers the general rules that: 1. A call to any method that would result in a deque having a size greater than the value returned by max_size triggers a call to bslstl::StdExceptUtil::throwLengthError. 2. A call to an at method that attempts to access a position outside of the valid range of a deque triggers a call to bslstl::StdExceptUtil::throwOutOfRange.