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

◆ generate()

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

Creates a kumi::tuple containing N copies of v.

Template Parameters
NNumber of replications
Parameters
vValue to replicate
Returns
A tuple containing N copy of v

Helper type

namespace kumi::result
{
template<std::size_t N, typename T> struct generate;
template<std::size_t N, typename T>
using generate_t = typename generate<N, T>::type;
}
constexpr auto generate(T const &v) noexcept
Creates a kumi::tuple containing N copies of v.
Definition: generate.hpp:42

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

Example

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
std::cout << kumi::generate<7>(42.63) << "\n";
}