14 template<concepts::ForwardIterator It1, concepts::SentinelFor<It1> Sent1, concepts::ForwardIterator It2,
15 concepts::SentinelFor<It2> Sent2,
typename Proj1 = function::Identity,
16 typename Proj2 = function::Identity,
17 concepts::IndirectEquivalenceRelation<meta::Projected<It1, Sent1>, meta::Projected<It2, Sent2>> Pred =
19 constexpr auto operator()(It1 first1, Sent1 sent1, It2 first2, Sent2 sent2, Pred pred = {}, Proj1 proj1 = {},
20 Proj2 proj2 = {})
const ->
bool {
24 return is_permutation_same_sized(util::move(first1), sent1, util::move(first2), sent2,
util::ref(pred),
28 template<concepts::ForwardContainer Con1, concepts::ForwardContainer Con2,
typename Proj1 = function::Identity,
29 typename Proj2 = function::Identity,
30 concepts::IndirectEquivalenceRelation<meta::Projected<meta::ContainerIterator<Con1>, Proj1>,
31 meta::Projected<meta::ContainerIterator<Con2>, Proj2>>
32 Pred = function::Equal>
33 constexpr auto operator()(Con1&& container1, Con2&& container2, Pred pred = {}, Proj1 proj1 = {},
34 Proj2 proj2 = {})
const ->
bool {
44 template<
typename It1,
typename Sent1,
typename It2,
typename Sent2,
typename Proj1,
typename Proj2,
46 constexpr static auto is_permutation_same_sized(It1 first1, Sent1 sent1, It2 first2, Sent2 sent2, Pred pred,
47 Proj1 proj1, Proj2 proj2) ->
bool {
49 auto [left, right] =
container::mismatch(util::move(first1), sent1, util::move(first2), sent2,
52 for (
auto it = left; it != sent1; ++it) {
53 auto compare_to_current = [&]<
typename T>(
T&&
value) ->
bool {
65 if (count_right == 0 ||
constexpr auto operator()(It1 first1, Sent1 sent1, It2 first2, Sent2 sent2, Pred pred={}, Proj1 proj1={}, Proj2 proj2={}) const -> bool
Definition is_permutation.h:19
constexpr auto operator()(Con1 &&container1, Con2 &&container2, Pred pred={}, Proj1 proj1={}, Proj2 proj2={}) const -> bool
Definition is_permutation.h:33