KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches

◆ fill

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

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

Header file

#include <kumi/algorithm/generate.hpp>

Call Signature

template<std::size_t N, typename V>
constexpr auto fill<N>(V const& v) noexcept;
constexpr fill_t< N > fill
Callable object creating a kumi::tuple containing N copies of v.
Definition generate.hpp:149

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

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";
}