41template <
typename ... Ts >
42class tuple :
public std::tuple < Ts ... > {
47 using std::tuple< Ts ... >
::tuple;
52 using std::tuple< Ts ... >::operator =;
82 template <
typename T,
typename R >
83 void assignSingle ( T & t, R & r ) {
87 template <
typename ... Rs,
size_t ... Indexes >
88 void assign (
const tuple < Rs ... > & other, std::index_sequence < Indexes ... > ) {
89 static_assert (
sizeof ... ( Ts ) ==
sizeof ... ( Rs ) );
90 ( assignSingle ( std::get < Indexes > ( *
this ), std::get < Indexes > ( other ) ), ... );
93 template <
typename ... Rs >
95 assign ( other, std::make_index_sequence <
sizeof ... ( Rs ) > ( ) );
99 template <
typename T1,
typename R2 >
101 static_assert ( 2 ==
sizeof ... ( Ts ) );
102 std::get < 0 > ( *
this ) = other.first;
103 std::get < 1 > ( *
this ) = other.second;
116 template < std::
size_t I >
118 return std::get < I > ( *
this );
129 template < std::
size_t I >
131 return std::get < I > ( std::move ( *
this ) );
142 template < std::
size_t I >
143 const auto &
get ( ) const & {
144 return std::get < I > ( *
this );
153 template <
class T,
class R >
154 requires (
sizeof ... ( Ts ) == 2 )
159 template <
class T2,
class R2 >
175template<
class... Ts>
179 if constexpr (
sizeof ... ( Ts ) > 0 ) {
180 auto outCallback = [ & ] (
const auto & first,
const auto & ... other ) {
182 ( ( out <<
", " << other ), ... );
202template <
typename ... Elements >
217template<
typename ... Elements >
218constexpr tuple < Elements & ... >
tie ( Elements & ... args )
noexcept {
219 return tuple < Elements & ... > ( args ... );
222template <
typename ... Ts >
223template <
class T2,
class R2 >
238template <
class ... Types >
239struct tuple_size <
ext::tuple < Types ... > > :
public std::integral_constant < std::size_t, sizeof...( Types ) > { };
250template < std::size_t I,
class... Types >
251struct tuple_element < I,
ext::tuple < Types... > > {
252 typedef typename std::tuple_element < I, std::tuple < Types ... > >
::type type;
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
auto && get() &&
New behavior of get for rvalue referenced instance.
Definition: tuple.hpp:130
auto & get() &
Inherited behavior of get for non-const instance.
Definition: tuple.hpp:117
tuple & operator=(tuple &&other)=default
tuple(const tuple &other)=default
tuple(tuple &&other)=default
const auto & get() const &
Inherited behavior of get fro const instance.
Definition: tuple.hpp:143
constexpr auto operator<=>(const ext::pair< T2, R2 > &second) const
Definition: tuple.hpp:224
constexpr decltype(auto) apply(F &&f, Tuple &&t)
Definition: AbstractionHelpers.hpp:27
p second
Definition: ToRegExpAlgebraic.h:126
Definition: sigHandler.cpp:20
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
constexpr auto make_tuple(Elements &&... args)
Helper of extended tuple construction. The tuple is constructed from values pack, types are deduced.
Definition: tuple.hpp:203
std::ostream & operator<<(ext::reference_wrapper< std::ostream > &os, std::ostream &(*const func)(std::ostream &))
Overloaded function allowing same operations on wrapped output stream as on the actual output stream,...
Definition: GlobalData.cpp:33
Definition: FordFulkerson.hpp:16
std::tuple_element< I, std::tuple< Types... > >::type type
Definition: tuple.hpp:252