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

◆ transpose()

template<product_type T>
requires ( _::supports_transpose<T> )
constexpr auto kumi::transpose ( T &&  t)
inlineconstexpr

Transpose a product type of product types by shifting elements in their transposed position always returning a tuple as the external product type.

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

Helper type

namespace kumi::result
{
template<product_type T> struct transpose;
template<product_type T>
using transpose_t = typename transpose<T>::type;
}
constexpr auto transpose(T &&t)
Transpose a product type of product types by shifting elements in their transposed position always re...
Definition transpose.hpp:38

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

Example

#include <kumi/kumi.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:37