kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ transpose()

template<product_type Tuple>
constexpr auto kumi::transpose ( Tuple const &  t)
constexpr

Transpose a tuple of tuples by shifting elements in their transposed position.

Parameters
tTuple to transpose
Returns
A tuple containing the transposed elements of t.

Helper type

namespace kumi::result
{
template<product_type Tuple> struct transpose;
template<product_type Tuple>
using transpose_t = typename transpose<Tuple>::type;
}
constexpr auto transpose(Tuple const &t)
Transpose a tuple of tuples by shifting elements in their transposed position.
Definition: transpose.hpp:35

Computes the return type of a call to kumi::transpose

Example

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
auto values = kumi::tuple { kumi::tuple{ 1, 'a', 0.1 }
, kumi::tuple{ 2, 'b', 0.01 }
};
auto r = kumi::transpose(values );
std::cout << r << "\n";
}
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35