38 struct linear_distribute_view :
view_facade<linear_distribute_view<T>, finite>
40 CPP_assert(std::is_arithmetic<T>());
50 constexpr T read()
const noexcept
58 constexpr bool equal(linear_distribute_view
const & other)
const noexcept
60 bool const eq = n_ == other.n_;
61 RANGES_DIAGNOSTIC_PUSH
62 RANGES_DIAGNOSTIC_IGNORE_FLOAT_EQUAL
63 RANGES_EXPECT(to_ == other.to_);
64 RANGES_EXPECT(!eq || from_ == other.from_);
68 constexpr void next()
noexcept
70 RANGES_EXPECT(n_ > 0);
78 from_ = T(to_ - (delta_ * Calc(n_ - 1)));
83 constexpr linear_distribute_view() =
default;
84 constexpr linear_distribute_view(T from, T to, std::ptrdiff_t n) noexcept
87 , delta_(n > 1 ? (to - from) / Calc(n - 1) : 0)
90 RANGES_EXPECT(n_ > 0);
91 RANGES_EXPECT(to_ >= from_);
93 constexpr std::size_t size()
const noexcept
95 return static_cast<std::size_t
>(n_);
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition conversion.hpp:399
typename detail::_cond< If >::template invoke< Then, Else > conditional_t
Select one type or another depending on a compile-time Boolean.
Definition meta.hpp:1148