function object
std::ranges::shuffle
- Header
<algorithm>- Draft
- [alg.random.shuffle]
- Scope
std::ranges- cppreference
- std::ranges::shuffle
Synopsis
inline constexpr /* implementation-defined */ shuffle = {};Call signatures
shuffle is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template<std::ranges::random_access_range R, class Gen> requires std::permutable<iterator_t<R>> && std::uniform_random_bit_generator<std::remove_reference_t<Gen>> borrowed_iterator_t<R> shuffle(R&& r, Gen&& g); - (2)
template<std::random_access_iterator I, std::sentinel_for<I> S, class Gen> requires std::permutable<I> && std::uniform_random_bit_generator<std::remove_reference_t<Gen>> I shuffle(I first, S last, Gen&& g);