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

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

#include <array.hpp>

Inheritance diagram for ext::array< T, N >:
[legend]
Collaboration diagram for ext::array< T, N >:
[legend]

Public Member Functions

 array ()=default
 
 array (const array &other)=default
 
 array (array &&other)=default
 
arrayoperator= (array &&other)=default
 
arrayoperator= (const array &other)=default
 
template<class ... Types>
requires ( std::is_same < T, typename std::remove_reference < Types >::type >::value && ... )
 array (Types &&... args)
 
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, std::size_t N>
class ext::array< T, N >

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

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

Template Parameters
Tthe type of values in the array
Nthe size of the array

Constructor & Destructor Documentation

◆ array() [1/4]

template<class T , std::size_t N>
ext::array< T, N >::array ( )
default

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

◆ array() [2/4]

template<class T , std::size_t N>
ext::array< T, N >::array ( const array< T, N > &  other)
default

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

◆ array() [3/4]

template<class T , std::size_t N>
ext::array< T, N >::array ( array< T, N > &&  other)
default

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

◆ array() [4/4]

template<class T , std::size_t N>
template<class ... Types>
requires ( std::is_same < T, typename std::remove_reference < Types >::type >::value && ... )
ext::array< T, N >::array ( Types &&...  args)
inlineexplicit

Constructor of array from list of values.

Member Function Documentation

◆ begin() [1/3]

template<class T , std::size_t N>
auto ext::array< T, N >::begin ( ) &
inline

Inherited behavior of begin for non-const instance.

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

◆ begin() [2/3]

template<class T , std::size_t N>
auto ext::array< T, N >::begin ( ) &&
inline

Inherited behavior of begin for rvalues.

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

◆ begin() [3/3]

template<class T , std::size_t N>
auto ext::array< T, N >::begin ( ) const &
inline

Inherited behavior of begin for const instance.

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

◆ end() [1/3]

template<class T , std::size_t N>
auto ext::array< T, N >::end ( ) &
inline

Inherited behavior of end for non-const instance.

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

◆ end() [2/3]

template<class T , std::size_t N>
auto ext::array< T, N >::end ( ) &&
inline

Inherited behavior of end for rvalues.

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

◆ end() [3/3]

template<class T , std::size_t N>
auto ext::array< T, N >::end ( ) const &
inline

Inherited behavior of end for const instance.

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

◆ operator=() [1/2]

template<class T , std::size_t N>
array & ext::array< T, N >::operator= ( array< T, N > &&  other)
default

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

◆ operator=() [2/2]

template<class T , std::size_t N>
array & ext::array< T, N >::operator= ( const array< T, N > &  other)
default

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

◆ range() [1/3]

template<class T , std::size_t N>
auto ext::array< T, N >::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 , std::size_t N>
auto ext::array< T, N >::range ( ) &&
inline

Make range of move begin to end iterators.

Returns
full range over container values

◆ range() [3/3]

template<class T , std::size_t N>
auto ext::array< T, N >::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: