0.2.0
Loading...
Searching...
No Matches
NAV::TsDeque< T, Alloc > Class Template Reference

Thread-safe deque. More...

Public Member Functions

template<class InputIt >
void assign (InputIt first, InputIt last)
 Replaces the contents with copies of those in the range [first, last). The behavior is undefined if either argument is an iterator into *this.
 
void assign (std::initializer_list< T > ilist)
 Replaces the contents with the elements from the initializer list ilist.
 
void assign (typename std::deque< T, Alloc >::size_type count, const T &value)
 Replaces the contents with count copies of value value.
 
auto & at (typename std::deque< T, Alloc >::size_type pos)
 Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.
 
const auto & at (typename std::deque< T, Alloc >::size_type pos) const
 Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.
 
auto & back ()
 Returns a reference to the last element in the container.
 
const auto & back () const
 Returns a reference to the last element in the container.
 
std::deque< T >::const_iterator begin () const noexcept
 Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().
 
std::deque< T >::iterator begin () noexcept
 Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().
 
std::deque< T >::const_iterator cbegin () const noexcept
 Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().
 
std::deque< T >::const_iterator cend () const noexcept
 Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.
 
void clear () noexcept
 
std::deque< T >::const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().
 
std::deque< T >::const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
template<class... Args>
std::deque< T >::iterator emplace (typename std::deque< T >::const_iterator pos, Args &&... args)
 Inserts a new element into the container directly before pos.
 
template<class... Args>
auto & emplace_back (Args &&... args)
 Appends a new element to the end of the container.
 
template<class... Args>
auto & emplace_front (Args &&... args)
 Inserts a new element to the beginning of the container.
 
bool empty () const noexcept
 Checks if the container has no elements, i.e. whether 'begin() == end()'.
 
std::deque< T >::const_iterator end () const noexcept
 Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.
 
std::deque< T >::iterator end () noexcept
 Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.
 
std::deque< T >::iterator erase (typename std::deque< T >::const_iterator first, typename std::deque< T >::const_iterator last)
 Removes the elements in the range [first, last). All iterators and references are invalidated, unless the erased elements are at the end or the beginning of the container, in which case only the iterators and references to the erased elements are invalidated.
 
std::deque< T >::iterator erase (typename std::deque< T >::const_iterator pos)
 Removes the element at pos.
 
auto extract_front ()
 Returns a copy of the first element in the container and removes it from the container.
 
auto & front ()
 Returns a reference to the first element in the container.
 
const auto & front () const
 Returns a reference to the first element in the container.
 
std::deque< T, Alloc >::allocator_type get_allocator () const noexcept
 Returns the allocator associated with the container.
 
std::deque< T >::iterator insert (typename std::deque< T >::const_iterator pos, const T &value)
 Insert value before pos in the container.
 
template<class InputIt >
std::deque< T >::iterator insert (typename std::deque< T >::const_iterator pos, InputIt first, InputIt last)
 inserts elements from range [first, last) before pos.
 
std::deque< T >::iterator insert (typename std::deque< T >::const_iterator pos, std::initializer_list< T > ilist)
 Inserts elements from initializer list ilist before pos.
 
std::deque< T >::iterator insert (typename std::deque< T >::const_iterator pos, T &&value)
 Insert value before pos in the container.
 
std::deque< T >::iterator insert (typename std::deque< T >::const_iterator pos, typename std::deque< T, Alloc >::size_type count, const T &value)
 inserts count copies of the value before pos
 
std::deque< T, Alloc >::size_type max_size () const noexcept
 Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the largest container.
 
TsDequeoperator= (const TsDeque &other)
 Copy assignment operator.
 
TsDequeoperator= (std::initializer_list< T > ilist)
 Replaces the contents with those identified by initializer list ilist.
 
TsDequeoperator= (TsDeque &&other) noexcept
 Move assignment operator.
 
auto & operator[] (typename std::deque< T, Alloc >::size_type pos)
 Returns a reference to the element at specified location pos. No bounds checking is performed.
 
const auto & operator[] (typename std::deque< T, Alloc >::size_type pos) const
 Returns a reference to the element at specified location pos. No bounds checking is performed.
 
void pop_back ()
 Removes the last element of the container.
 
void pop_front ()
 Removes the first element of the container. If there are no elements in the container, the behavior is undefined.
 
void push_back (const T &value)
 Appends the given element value to the end of the container. The new element is initialized as a copy of value.
 
void push_back (T &&value)
 Appends the given element value to the end of the container. Value is moved into the new element.
 
void push_front (const T &value)
 Prepends the given element value to the beginning of the container. The new element is initialized as a copy of value. All iterators, including the past-the-end iterator, are invalidated. No references are invalidated.
 
void push_front (T &&value)
 Prepends the given element value to the beginning of the container. Value is moved into the new element. All iterators, including the past-the-end iterator, are invalidated. No references are invalidated.
 
std::deque< T >::const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().
 
std::deque< T >::reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().
 
std::deque< T >::const_reverse_iterator rend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
std::deque< T >::reverse_iterator rend () noexcept
 Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
void resize (typename std::deque< T, Alloc >::size_type count)
 Resizes the container to contain count elements.
 
void resize (typename std::deque< T, Alloc >::size_type count, const T &value)
 Resizes the container to contain count elements.
 
void shrink_to_fit ()
 Requests the removal of unused capacity.
 
std::deque< T, Alloc >::size_type size () const noexcept
 Returns the number of elements in the container, i.e. std::distance(begin(), end()).
 
void swap (std::deque< T > &other) noexcept
 Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.
 
 TsDeque ()=default
 Default Constructor. Constructs an empty container with a default-constructed allocator.
 
 TsDeque (const Alloc &alloc)
 Constructs an empty container with the given allocator alloc.
 
 TsDeque (const TsDeque &other)
 Copy constructor. Constructs the container with the copy of the contents of other.
 
 TsDeque (const TsDeque &other, const Alloc &alloc)
 Constructs the container with the copy of the contents of other, using alloc as the allocator.
 
template<class InputIt >
 TsDeque (InputIt first, InputIt last, const Alloc &alloc=Alloc())
 Constructs the container with the contents of the range [first, last).
 
 TsDeque (std::initializer_list< T > init, const Alloc &alloc=Alloc())
 Constructs the container with the contents of the initializer list init.
 
 TsDeque (TsDeque &&other) noexcept
 Move constructor. Constructs the container with the contents of other using move semantics. Allocator is obtained by move-construction from the allocator belonging to other.
 
 TsDeque (TsDeque &&other, const Alloc &alloc) noexcept
 Allocator-extended move constructor. Using alloc as the allocator for the new container, moving the contents from other; if alloc != other.get_allocator(), this results in an element-wise move.
 
 TsDeque (typename std::deque< T, Alloc >::size_type count, const Alloc &alloc=Alloc())
 Constructs the container with count default-inserted instances of T. No copies are made.
 
 TsDeque (typename std::deque< T, Alloc >::size_type count, const T &value, const Alloc &alloc=Alloc())
 Constructs the container with count copies of elements with value value.
 
 ~TsDeque ()=default
 Destructor.
 

Detailed Description

template<class T, class Alloc = std::allocator<T>>
class NAV::TsDeque< T, Alloc >

Thread-safe deque.

Template Parameters
TThe type of the elements.
AllocAllocator that is used to acquire/release memory and to construct/destroy the elements in that memory.

Constructor & Destructor Documentation

◆ TsDeque() [1/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( const Alloc & alloc)
inlineexplicit

Constructs an empty container with the given allocator alloc.

Parameters
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [2/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( typename std::deque< T, Alloc >::size_type count,
const T & value,
const Alloc & alloc = Alloc() )
inline

Constructs the container with count copies of elements with value value.

Parameters
countThe size of the container
valueThe value to initialize elements of the container with
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [3/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( typename std::deque< T, Alloc >::size_type count,
const Alloc & alloc = Alloc() )
inlineexplicit

Constructs the container with count default-inserted instances of T. No copies are made.

Parameters
countThe size of the container
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [4/9]

template<class T , class Alloc = std::allocator<T>>
template<class InputIt >
NAV::TsDeque< T, Alloc >::TsDeque ( InputIt first,
InputIt last,
const Alloc & alloc = Alloc() )
inline

Constructs the container with the contents of the range [first, last).

Parameters
firstFirst element of the range to copy the elements from
lastLast element the range to copy the elements from
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [5/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( const TsDeque< T, Alloc > & other)
inline

Copy constructor. Constructs the container with the copy of the contents of other.

Parameters
otherAnother container to be used as source to initialize the elements of the container with

◆ TsDeque() [6/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( const TsDeque< T, Alloc > & other,
const Alloc & alloc )
inline

Constructs the container with the copy of the contents of other, using alloc as the allocator.

Parameters
otherAnother container to be used as source to initialize the elements of the container with
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [7/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( TsDeque< T, Alloc > && other)
inlinenoexcept

Move constructor. Constructs the container with the contents of other using move semantics. Allocator is obtained by move-construction from the allocator belonging to other.

Parameters
otherAnother container to be used as source to initialize the elements of the container with

◆ TsDeque() [8/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( TsDeque< T, Alloc > && other,
const Alloc & alloc )
inlinenoexcept

Allocator-extended move constructor. Using alloc as the allocator for the new container, moving the contents from other; if alloc != other.get_allocator(), this results in an element-wise move.

Parameters
otherAnother container to be used as source to initialize the elements of the container with
allocAllocator to use for all memory allocations of this container

◆ TsDeque() [9/9]

template<class T , class Alloc = std::allocator<T>>
NAV::TsDeque< T, Alloc >::TsDeque ( std::initializer_list< T > init,
const Alloc & alloc = Alloc() )
inline

Constructs the container with the contents of the initializer list init.

Parameters
initInitializer list to initialize the elements of the container with
allocAllocator to use for all memory allocations of this container

Member Function Documentation

◆ assign() [1/3]

template<class T , class Alloc = std::allocator<T>>
template<class InputIt >
void NAV::TsDeque< T, Alloc >::assign ( InputIt first,
InputIt last )
inline

Replaces the contents with copies of those in the range [first, last). The behavior is undefined if either argument is an iterator into *this.

All iterators, pointers and references to the elements of the container are invalidated. The past-the-end iterator is also invalidated.

Parameters
[in]firstThe first element of the range to copy the elements from
[in]lastThe last element of the range to copy the elements from

◆ assign() [2/3]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::assign ( std::initializer_list< T > ilist)
inline

Replaces the contents with the elements from the initializer list ilist.

All iterators, pointers and references to the elements of the container are invalidated. The past-the-end iterator is also invalidated.

Parameters
ilistInitializer list to copy the values from

◆ assign() [3/3]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::assign ( typename std::deque< T, Alloc >::size_type count,
const T & value )
inline

Replaces the contents with count copies of value value.

All iterators, pointers and references to the elements of the container are invalidated. The past-the-end iterator is also invalidated.

Parameters
countThe new size of the container
valueThe value to initialize elements of the container with

◆ at() [1/2]

template<class T , class Alloc = std::allocator<T>>
auto & NAV::TsDeque< T, Alloc >::at ( typename std::deque< T, Alloc >::size_type pos)
inline

Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.

Parameters
[in]posPosition of the element to return
Returns
Reference to the requested element.

◆ at() [2/2]

template<class T , class Alloc = std::allocator<T>>
const auto & NAV::TsDeque< T, Alloc >::at ( typename std::deque< T, Alloc >::size_type pos) const
inline

Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.

Parameters
[in]posPosition of the element to return
Returns
Reference to the requested element.

◆ back() [1/2]

template<class T , class Alloc = std::allocator<T>>
auto & NAV::TsDeque< T, Alloc >::back ( )
inline

Returns a reference to the last element in the container.

Returns
Reference to the last element

◆ back() [2/2]

template<class T , class Alloc = std::allocator<T>>
const auto & NAV::TsDeque< T, Alloc >::back ( ) const
inline

Returns a reference to the last element in the container.

Returns
Reference to the last element

◆ begin() [1/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_iterator NAV::TsDeque< T, Alloc >::begin ( ) const
inlinenoexcept

Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().

Returns
Iterator to the first element.

◆ begin() [2/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::begin ( )
inlinenoexcept

Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().

Returns
Iterator to the first element.

◆ cbegin()

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_iterator NAV::TsDeque< T, Alloc >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the first element of the deque. If the deque is empty, the returned iterator will be equal to end().

Returns
Iterator to the first element.

◆ cend()

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_iterator NAV::TsDeque< T, Alloc >::cend ( ) const
inlinenoexcept

Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
Iterator to the element following the last element.

◆ clear()

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::clear ( )
inlinenoexcept

Erases all elements from the container. After this call, size() returns zero. Invalidates any references, pointers, or iterators referring to contained elements. Any past-the-end iterators are also invalidated.

◆ crbegin()

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_reverse_iterator NAV::TsDeque< T, Alloc >::crbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().

Returns
Reverse iterator to the first element.

◆ crend()

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_reverse_iterator NAV::TsDeque< T, Alloc >::crend ( ) const
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
Reverse iterator to the element following the last element.

◆ emplace()

template<class T , class Alloc = std::allocator<T>>
template<class... Args>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::emplace ( typename std::deque< T >::const_iterator pos,
Args &&... args )
inline

Inserts a new element into the container directly before pos.

Parameters
[in]posIterator before which the new element will be constructed
[in]argsArguments to forward to the constructor of the element
Returns
Iterator pointing to the emplaced element.

◆ emplace_back()

template<class T , class Alloc = std::allocator<T>>
template<class... Args>
auto & NAV::TsDeque< T, Alloc >::emplace_back ( Args &&... args)
inline

Appends a new element to the end of the container.

Parameters
[in]argsArguments to forward to the constructor of the element
Returns
A reference to the inserted element.

◆ emplace_front()

template<class T , class Alloc = std::allocator<T>>
template<class... Args>
auto & NAV::TsDeque< T, Alloc >::emplace_front ( Args &&... args)
inline

Inserts a new element to the beginning of the container.

Parameters
[in]argsArguments to forward to the constructor of the element
Returns
A reference to the inserted element.

◆ empty()

template<class T , class Alloc = std::allocator<T>>
bool NAV::TsDeque< T, Alloc >::empty ( ) const
inlinenoexcept

Checks if the container has no elements, i.e. whether 'begin() == end()'.

Returns
true if the container is empty, false otherwise

◆ end() [1/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_iterator NAV::TsDeque< T, Alloc >::end ( ) const
inlinenoexcept

Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
Iterator to the element following the last element.

◆ end() [2/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::end ( )
inlinenoexcept

Returns an iterator to the element following the last element of the deque. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
Iterator to the element following the last element.

◆ erase() [1/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::erase ( typename std::deque< T >::const_iterator first,
typename std::deque< T >::const_iterator last )
inline

Removes the elements in the range [first, last). All iterators and references are invalidated, unless the erased elements are at the end or the beginning of the container, in which case only the iterators and references to the erased elements are invalidated.

Parameters
[in]firstFirst element of the range of elements to remove
[in]lastLast element of the range of elements to remove
Returns
Iterator following the last removed element.

◆ erase() [2/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::erase ( typename std::deque< T >::const_iterator pos)
inline

Removes the element at pos.

Parameters
[in]posIterator to the element to remove
Returns
Iterator following the last removed element.

◆ extract_front()

template<class T , class Alloc = std::allocator<T>>
auto NAV::TsDeque< T, Alloc >::extract_front ( )
inline

Returns a copy of the first element in the container and removes it from the container.

Returns
Copy of the first element

◆ front() [1/2]

template<class T , class Alloc = std::allocator<T>>
auto & NAV::TsDeque< T, Alloc >::front ( )
inline

Returns a reference to the first element in the container.

Returns
Reference to the first element

◆ front() [2/2]

template<class T , class Alloc = std::allocator<T>>
const auto & NAV::TsDeque< T, Alloc >::front ( ) const
inline

Returns a reference to the first element in the container.

Returns
Reference to the first element

◆ get_allocator()

template<class T , class Alloc = std::allocator<T>>
std::deque< T, Alloc >::allocator_type NAV::TsDeque< T, Alloc >::get_allocator ( ) const
inlinenoexcept

Returns the allocator associated with the container.

Returns
The associated allocator.

◆ insert() [1/5]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::insert ( typename std::deque< T >::const_iterator pos,
const T & value )
inline

Insert value before pos in the container.

Parameters
[in]posIterator before which the content will be inserted. pos may be the end() iterator
[in]valueElement value to insert
Returns
Iterator pointing to the inserted value

◆ insert() [2/5]

template<class T , class Alloc = std::allocator<T>>
template<class InputIt >
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::insert ( typename std::deque< T >::const_iterator pos,
InputIt first,
InputIt last )
inline

inserts elements from range [first, last) before pos.

Template Parameters
InputItInput iterator type
Parameters
[in]posIterator before which the content will be inserted. pos may be the end() iterator
[in]firstThe first element of the range of elements to insert, can't be iterators into container for which insert is called
[in]lastThe last element of the range of elements to insert, can't be iterators into container for which insert is called
Returns
Iterator pointing to the first element inserted, or pos if first==last.

◆ insert() [3/5]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::insert ( typename std::deque< T >::const_iterator pos,
std::initializer_list< T > ilist )
inline

Inserts elements from initializer list ilist before pos.

Parameters
[in]posIterator before which the content will be inserted. pos may be the end() iterator
[in]ilistInitializer list to insert the values from
Returns
Iterator pointing to the first element inserted, or pos if ilist is empty.

◆ insert() [4/5]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::insert ( typename std::deque< T >::const_iterator pos,
T && value )
inline

Insert value before pos in the container.

Parameters
[in]posIterator before which the content will be inserted. pos may be the end() iterator
[in]valueElement value to insert
Returns
Iterator pointing to the inserted value

◆ insert() [5/5]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::iterator NAV::TsDeque< T, Alloc >::insert ( typename std::deque< T >::const_iterator pos,
typename std::deque< T, Alloc >::size_type count,
const T & value )
inline

inserts count copies of the value before pos

Parameters
[in]posIterator before which the content will be inserted. pos may be the end() iterator
[in]countNumber of elements to insert
[in]valueElement value to insert
Returns
Linear in count plus linear in the lesser of the distances between pos and either of the ends of the container.

◆ max_size()

template<class T , class Alloc = std::allocator<T>>
std::deque< T, Alloc >::size_type NAV::TsDeque< T, Alloc >::max_size ( ) const
inlinenoexcept

Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the largest container.

Returns
Maximum number of elements.

◆ operator=()

template<class T , class Alloc = std::allocator<T>>
TsDeque & NAV::TsDeque< T, Alloc >::operator= ( std::initializer_list< T > ilist)
inline

Replaces the contents with those identified by initializer list ilist.

Parameters
ilistInitializer list to use as data source

◆ operator[]() [1/2]

template<class T , class Alloc = std::allocator<T>>
auto & NAV::TsDeque< T, Alloc >::operator[] ( typename std::deque< T, Alloc >::size_type pos)
inline

Returns a reference to the element at specified location pos. No bounds checking is performed.

Parameters
[in]posPosition of the element to return
Returns
Reference to the requested element.

◆ operator[]() [2/2]

template<class T , class Alloc = std::allocator<T>>
const auto & NAV::TsDeque< T, Alloc >::operator[] ( typename std::deque< T, Alloc >::size_type pos) const
inline

Returns a reference to the element at specified location pos. No bounds checking is performed.

Parameters
[in]posPosition of the element to return
Returns
Reference to the requested element.

◆ push_back() [1/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::push_back ( const T & value)
inline

Appends the given element value to the end of the container. The new element is initialized as a copy of value.

Parameters
[in]valueThe value of the element to append

◆ push_back() [2/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::push_back ( T && value)
inline

Appends the given element value to the end of the container. Value is moved into the new element.

Parameters
[in]valueThe value of the element to append

◆ push_front() [1/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::push_front ( const T & value)
inline

Prepends the given element value to the beginning of the container. The new element is initialized as a copy of value. All iterators, including the past-the-end iterator, are invalidated. No references are invalidated.

Parameters
[in]valueThe value of the element to prepend

◆ push_front() [2/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::push_front ( T && value)
inline

Prepends the given element value to the beginning of the container. Value is moved into the new element. All iterators, including the past-the-end iterator, are invalidated. No references are invalidated.

Parameters
[in]valueThe value of the element to prepend

◆ rbegin() [1/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_reverse_iterator NAV::TsDeque< T, Alloc >::rbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().

Returns
Reverse iterator to the first element.

◆ rbegin() [2/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::reverse_iterator NAV::TsDeque< T, Alloc >::rbegin ( )
inlinenoexcept

Returns a reverse iterator to the first element of the reversed deque. It corresponds to the last element of the non-reversed deque. If the deque is empty, the returned iterator is equal to rend().

Returns
Reverse iterator to the first element.

◆ rend() [1/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::const_reverse_iterator NAV::TsDeque< T, Alloc >::rend ( ) const
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
Reverse iterator to the element following the last element.

◆ rend() [2/2]

template<class T , class Alloc = std::allocator<T>>
std::deque< T >::reverse_iterator NAV::TsDeque< T, Alloc >::rend ( )
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed deque. It corresponds to the element preceding the first element of the non-reversed deque. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
Reverse iterator to the element following the last element.

◆ resize() [1/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::resize ( typename std::deque< T, Alloc >::size_type count)
inline

Resizes the container to contain count elements.

Parameters
[in]countNew size of the container

◆ resize() [2/2]

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::resize ( typename std::deque< T, Alloc >::size_type count,
const T & value )
inline

Resizes the container to contain count elements.

Parameters
[in]countNew size of the container
[in]valueThe value to initialize the new elements with

◆ size()

template<class T , class Alloc = std::allocator<T>>
std::deque< T, Alloc >::size_type NAV::TsDeque< T, Alloc >::size ( ) const
inlinenoexcept

Returns the number of elements in the container, i.e. std::distance(begin(), end()).

Returns
The number of elements in the container.

◆ swap()

template<class T , class Alloc = std::allocator<T>>
void NAV::TsDeque< T, Alloc >::swap ( std::deque< T > & other)
inlinenoexcept

Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.

Parameters
[in,out]otherContainer to exchange the contents with

The documentation for this class was generated from the following file: