KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches

Callable object creating a kumi::tuple containing N copies of v. More...

Variables

template<std::size_t N>
constexpr fill_t< N > kumi::fill {}

Detailed Description

Callable object creating a kumi::tuple containing N copies of v.

Variable Documentation

◆ fill

template<std::size_t N>
fill_t<N> kumi::fill {}
inlineconstexprnodiscardnoexcept

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<std::size_t N, typename V>
constexpr auto fill(V const& v) noexcept;
}
constexpr fill_t< N > fill
Definition generate.hpp:161
Main KUMI namespace.
Definition algorithm.hpp:11

Template Parameters

  • N: Number of replications

Parameters

  • v: Value to replicate

Return value

  • A tuple containing N copies of v

Helper type

template<std::size_t N, typename T> using fill_t = decltype(kumi::fill<N>(kumi::declval<T>()));
template<std::size_t N, typename T> struct fill
{
using type = kumi::result::fill_t<N, T>;
};

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

Example

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