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

◆ iota()

template<std::size_t N, typename T >
constexpr auto kumi::iota ( v)
constexprnoexcept

Creates a kumi::tuple containing an increasing ramp of values.

Template Parameters
NNumber of replications
Parameters
vSeed value
Returns
A tuple containing {v, v + 1, ..., v + N-1}

Helper type

namespace kumi::result
{
template<std::size_t N, typename T> struct iota;
template<std::size_t N, typename T>
using iota_t = typename iota<N, T>::type;
}
constexpr auto iota(T v) noexcept
Creates a kumi::tuple containing an increasing ramp of values.
Definition: generate.hpp:74

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

Example

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
std::cout << kumi::iota<10>(3.57f) << "\n";
}