A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4086 below:

Issue 4086: ranges::generate_random_n is missing

template<class G, output_iterator<invoke_result_t<G&>> O, sentinel_for<O> S>
  requires uniform_random_bit_generator<remove_cvref_t<G>>
constexpr O ranges::generate_random(O first, S last, G&& g);

-4- Effects: Equivalent to:

return generate_random(subrange<O, S>(std::move(first), last), g);
template<class G, output_iterator<invoke_result_t<G&>> O>
  requires uniform_random_bit_generator<remove_cvref_t<G>>
constexpr O ranges::generate_random_n(O first, iter_difference_t<O> n, G&& g);

-?- Effects: Equivalent to:

return generate_random(counted_iterator(std::move(first), n),
            default_sentinel, g).base();
[…]
template<class G, class D, output_iterator<invoke_result_t<D&, G&>> O, sentinel_for<O> S>
  requires invocable<D&, G&> && uniform_random_bit_generator<remove_cvref_t<G>>
constexpr O ranges::generate_random(O first, S last, G&& g, D&& d);

-8- Effects: Equivalent to:

return generate_random(subrange<O, S>(std::move(first), last), g, d);
template<class G, class D, output_iterator<invoke_result_t<D&, G&>> O>
  requires invocable<D&, G&> && uniform_random_bit_generator<remove_cvref_t<G>>
constexpr O ranges::generate_random_n(O first, iter_difference_t<O> n, G&& g, D&& d);

-?- Effects: Equivalent to:

return generate_random(counted_iterator(std::move(first), n),
          default_sentinel, g, d).base();

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4