libycxx

function object

std::ranges::generate_random

Header
<random>
Scope
std::ranges
cppreference
<random> nearest page

Synopsis

inline constexpr /* implementation-defined */ generate_random = {};

Call signatures

generate_random is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.

  1. template<class R, class G>
      requires std::ranges::output_range<R, std::invoke_result_t<G&>> &&
                 std::uniform_random_bit_generator<std::remove_cvref_t<G>>
    constexpr std::ranges::borrowed_iterator_t<R> generate_random(R&& r, G&& g);
    (1)
  2. template<
        class G,
        std::output_iterator<std::invoke_result_t<G&>> O,
        std::sentinel_for<O> S>
      requires std::uniform_random_bit_generator<std::remove_cvref_t<G>>
    constexpr O generate_random(O first, S last, G&& g);
    (2)
  3. template<class R, class G, class D>
      requires std::ranges::output_range<R, std::invoke_result_t<D&, G&>> && std::invocable<D&, G&> &&
                 std::uniform_random_bit_generator<std::remove_cvref_t<G>> &&
                 std::is_arithmetic_v<std::invoke_result_t<D&, G&>>
    constexpr std::ranges::borrowed_iterator_t<R> generate_random(
        R&& r,
        G&& g,
        D&& d);
    (3)
  4. template<
        class G,
        class D,
        std::output_iterator<std::invoke_result_t<D&, G&>> O,
        std::sentinel_for<O> S>
      requires std::invocable<D&, G&> && std::uniform_random_bit_generator<std::remove_cvref_t<G>> &&
                 std::is_arithmetic_v<std::invoke_result_t<D&, G&>>
    constexpr O generate_random(O first, S last, G&& g, D&& d);
    (4)