Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions
ext::deque< T, Alloc > Class Template Reference

Class extending the deque class from the standard library. Original reason is to allow printing of the container with overloaded operator <<. More...

#include <deque.hpp>

Inheritance diagram for ext::deque< T, Alloc >:
[legend]
Collaboration diagram for ext::deque< T, Alloc >:
[legend]

Public Member Functions

 deque ()=default
 
 deque (const deque &other)=default
 
 deque (deque &&other)=default
 
dequeoperator= (deque &&other)=default
 
dequeoperator= (const deque &other)=default
 
template<class Iterator >
 deque (const ext::iterator_range< Iterator > &range)
 
auto begin () &
 Inherited behavior of begin for non-const instance. More...
 
auto begin () const &
 Inherited behavior of begin for const instance. More...
 
auto begin () &&
 Inherited behavior of begin for rvalues. More...
 
auto end () &
 Inherited behavior of end for non-const instance. More...
 
auto end () const &
 Inherited behavior of end for const instance. More...
 
auto end () &&
 Inherited behavior of end for rvalues. More...
 
auto range () &
 Make range of non-const begin to end iterators. More...
 
auto range () const &
 Make range of non-const begin to end iterators. More...
 
auto range () &&
 Make range of move begin to end iterators. More...
 

Detailed Description

template<class T, class Alloc = std::allocator < T >>
class ext::deque< T, Alloc >

Class extending the deque class from the standard library. Original reason is to allow printing of the container with overloaded operator <<.

The class mimics the behavior of the deque from the standatd library.

Template Parameters
Tthe type of values inside the deque
Allocthe allocator of values of type T

Constructor & Destructor Documentation

◆ deque() [1/4]

template<class T , class Alloc = std::allocator < T >>
ext::deque< T, Alloc >::deque ( )
default

Default constructor needed by g++ since it is not inherited

◆ deque() [2/4]

template<class T , class Alloc = std::allocator < T >>
ext::deque< T, Alloc >::deque ( const deque< T, Alloc > &  other)
default

Copy constructor needed by g++ since it is not inherited

◆ deque() [3/4]

template<class T , class Alloc = std::allocator < T >>
ext::deque< T, Alloc >::deque ( deque< T, Alloc > &&  other)
default

Move constructor needed by g++ since it is not inherited

◆ deque() [4/4]

template<class T , class Alloc = std::allocator < T >>
template<class Iterator >
ext::deque< T, Alloc >::deque ( const ext::iterator_range< Iterator > &  range)
inlineexplicit

Constructor from range of values.

Template Parameters
Iteratorthe type of range iterator
Parameters
rangethe source range

Member Function Documentation

◆ begin() [1/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::begin ( ) &
inline

Inherited behavior of begin for non-const instance.

Returns
iterator the first element of deque
Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin() [2/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::begin ( ) &&
inline

Inherited behavior of begin for rvalues.

Returns
move_iterator the first element of deque
Here is the call graph for this function:

◆ begin() [3/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::begin ( ) const &
inline

Inherited behavior of begin for const instance.

Returns
const_iterator the first element of deque
Here is the call graph for this function:

◆ end() [1/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::end ( ) &
inline

Inherited behavior of end for non-const instance.

Returns
iterator to one after the last element of deque
Here is the call graph for this function:
Here is the caller graph for this function:

◆ end() [2/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::end ( ) &&
inline

Inherited behavior of end for rvalues.

Returns
move_iterator to one after the last element of deque
Here is the call graph for this function:

◆ end() [3/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::end ( ) const &
inline

Inherited behavior of end for const instance.

Returns
const_iterator to one after the last element of deque
Here is the call graph for this function:

◆ operator=() [1/2]

template<class T , class Alloc = std::allocator < T >>
deque & ext::deque< T, Alloc >::operator= ( const deque< T, Alloc > &  other)
default

Move operator = needed by g++ since it is not inherited

◆ operator=() [2/2]

template<class T , class Alloc = std::allocator < T >>
deque & ext::deque< T, Alloc >::operator= ( deque< T, Alloc > &&  other)
default

Copy operator = needed by g++ since it is not inherited

◆ range() [1/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::range ( ) &
inline

Make range of non-const begin to end iterators.

Returns
full range over container values
Here is the call graph for this function:

◆ range() [2/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::range ( ) &&
inline

Make range of move begin to end iterators.

Returns
full range over container values

◆ range() [3/3]

template<class T , class Alloc = std::allocator < T >>
auto ext::deque< T, Alloc >::range ( ) const &
inline

Make range of non-const begin to end iterators.

Returns
full range over container values
Here is the call graph for this function:

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