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

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

#include <forward_list.hpp>

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

Public Member Functions

 forward_list ()=default
 
 forward_list (const forward_list &other)=default
 
 forward_list (forward_list &&other)=default
 
forward_listoperator= (forward_list &&other)=default
 
forward_listoperator= (const forward_list &other)=default
 
template<class Iterator >
 forward_list (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::forward_list< T, Alloc >

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

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

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

Constructor & Destructor Documentation

◆ forward_list() [1/4]

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

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

◆ forward_list() [2/4]

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

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

◆ forward_list() [3/4]

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

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

◆ forward_list() [4/4]

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

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::forward_list< T, Alloc >::begin ( ) &
inline

Inherited behavior of begin for non-const instance.

Returns
iterator the first element of forward_list
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::forward_list< T, Alloc >::begin ( ) &&
inline

Inherited behavior of begin for rvalues.

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

◆ begin() [3/3]

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

Inherited behavior of begin for const instance.

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

◆ end() [1/3]

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

Inherited behavior of end for non-const instance.

Returns
iterator to one after the last element of forward_list
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::forward_list< T, Alloc >::end ( ) &&
inline

Inherited behavior of end for rvalues.

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

◆ end() [3/3]

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

Inherited behavior of end for const instance.

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

◆ operator=() [1/2]

template<class T , class Alloc = std::allocator < T >>
forward_list & ext::forward_list< T, Alloc >::operator= ( const forward_list< 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 >>
forward_list & ext::forward_list< T, Alloc >::operator= ( forward_list< 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::forward_list< 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::forward_list< 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::forward_list< 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: