14#ifndef RANGES_V3_VIEW_GENERATE_N_HPP
15#define RANGES_V3_VIEW_GENERATE_N_HPP
29#include <range/v3/utility/static_const.hpp>
33#include <range/v3/detail/prologue.hpp>
44 using result_t = invoke_result_t<G &>;
45 semiregular_box_t<G> gen_;
46 detail::non_propagating_cache<result_t> val_;
62 result_t && read()
const
65 rng_->val_.emplace(rng_->gen_());
66 return static_cast<result_t &&
>(
static_cast<result_t &
>(*rng_->val_));
70 RANGES_EXPECT(0 != rng_->n_);
74 static_cast<void>(rng_->gen_());
103 template(
typename G)(
105 std::is_object<detail::decay_t<invoke_result_t<G &>>>::value AND
106 constructible_from<detail::decay_t<invoke_result_t<G &>>,
107 invoke_result_t<G &>> AND
108 assignable_from<detail::decay_t<invoke_result_t<G &>> &,
109 invoke_result_t<G &>>)
123#include <range/v3/detail/epilogue.hpp>
124#include <range/v3/detail/satisfy_boost_range.hpp>
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
std::integral_constant< std::size_t, N > size_t
An integral constant wrapper for std::size_t.
Definition: meta.hpp:163
Definition: default_sentinel.hpp:26
Definition: generate_n.hpp:41
A utility for constructing a view from a (derived) type that implements begin and end cursors.
Definition: facade.hpp:66
Definition: generate_n.hpp:102