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

◆ reverse()

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

Reverse elements of a kumi::product_type.

Parameters
tkumi::product_type to reverse
Returns
A tuple equivalent to kumi::make_tuple(t[index<size_v<T> - 1 - Idx>]...);

Helper type

namespace kumi::result
{
template<product_type Tuple> struct reverse;
template<product_type Tuple>
using reverse_t = typename reverse<Tuple>::type;
}
constexpr auto reverse(Tuple &&t)
Reverse elements of a kumi::product_type.
Definition: reverse.hpp:36

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

Example

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