Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::v3::view::linear_distribute_fn Struct Reference

Description

Distributes n values linearly in the closed interval [from, to].

Precondition
from <= to && n > 0

If from == to, returns n-times to. If n == 1 returns to.

Synopsis of methods

constexpr linear_distribute_fn linear_distribute {}
 

Public Member Functions

template<typename T , requires = (std::is_arithmetic<T>())>
constexpr auto operator() (T from, T to, std::ptrdiff_t n) const noexcept(noexcept(decltype(linear_distribute_view< T >{from, to, n})(linear_distribute_view< T >{from, to, n}))) -> decltype(linear_distribute_view< T >