mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix non-modidying operation algorithm iteration
This commit is contained in:
parent
db20f64991
commit
cf593ffeff
7 changed files with 37 additions and 27 deletions
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
{
|
||||
return first1_ == last1 ? true
|
||||
: sprout::count(first1, last1, *first1_)
|
||||
== sprout::count(first2, first2 + NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1), *first1_)
|
||||
== sprout::count(first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)), *first1_)
|
||||
&& sprout::detail::is_permutation_impl(first1, last1, first2, sprout::next(first1_))
|
||||
? true
|
||||
: false
|
||||
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
{
|
||||
return first1_ == last1 ? true
|
||||
: sprout::count_if(first1, last1, NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(first2, first2 + NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1), NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)), NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
&& sprout::detail::is_permutation_impl(first1, last1, first2, sprout::next(first1_), pred)
|
||||
? true
|
||||
: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue