Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Class extending the tuple class from the standard library. Original reason is to allow printing of the container with overloaded operator <<. More...
#include <tuple.hpp>
Public Member Functions | |
tuple ()=default | |
tuple (const tuple &other)=default | |
tuple (tuple &&other)=default | |
tuple & | operator= (tuple &&other)=default |
tuple & | operator= (const tuple &other)=default |
template<std::size_t I> | |
auto & | get () & |
Inherited behavior of get for non-const instance. More... | |
template<std::size_t I> | |
auto && | get () && |
New behavior of get for rvalue referenced instance. More... | |
template<std::size_t I> | |
const auto & | get () const & |
Inherited behavior of get fro const instance. More... | |
template<class T , class R > requires ( sizeof ... ( Ts ) == 2 ) | |
operator ext::pair< T, R > () const | |
Allow cast of tuple of two values to pair. More... | |
template<class T2 , class R2 > | |
constexpr auto | operator<=> (const ext::pair< T2, R2 > &second) const |
Class extending the tuple class from the standard library. Original reason is to allow printing of the container with overloaded operator <<.
The class mimics the behavior of the tuple from the standatd library.
Types | ... the types inside the tuple |
|
default |
Default constructor needed by g++ since it is not inherited
|
default |
Copy constructor needed by g++ since it is not inherited
|
default |
Move constructor needed by g++ since it is not inherited
Inherited behavior of get for non-const instance.
I | the index to retrieve |
New behavior of get for rvalue referenced instance.
I | the index to retrieve |
|
inline |
Inherited behavior of get fro const instance.
I | the index to retrieve |
|
inline |
Allow cast of tuple of two values to pair.
|
constexpr |
|
default |
Move operator = needed by g++ since it is not inherited
|
default |
Copy operator = needed by g++ since it is not inherited