function object
std::ranges::next_permutation
- Header
<algorithm>- Scope
std::ranges- cppreference
- std::ranges::next_permutation
Synopsis
inline constexpr /* implementation-defined */ next_permutation = {};Call signatures
next_permutation is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template< std::ranges::bidirectional_range R, class Comp = std::ranges::less, class Proj = std::identity> requires std::sortable<iterator_t<R>, Comp, Proj> constexpr std::ranges::in_found_result<borrowed_iterator_t<R>> next_permutation( R&& r, Comp comp = {}, Proj proj = {}); - (2)
template< std::bidirectional_iterator I, std::sentinel_for<I> S, class Comp = std::ranges::less, class Proj = std::identity> requires std::sortable<I, Comp, Proj> constexpr std::ranges::in_found_result<I> next_permutation( I first, S last, Comp comp = {}, Proj proj = {});