boostorg / range

Boost.org range module
http://boost.org/libs/range
43 stars 104 forks source link

is_permutation range version missing #98

Open allopislozano opened 4 years ago

allopislozano commented 4 years ago

There is no boost::ranges::is_permutation

Passing two ranges to boost::algorithm::is_permutation yields this error. The first parameter is correctly matched and the second parameter is incorrectly interpreted as a ForwardIterator without any BOOST_CONCEPT checks: https://godbolt.org/z/TCE8Xm

It is also surprising that an algorithm defined in boost::algorithm takes a range as a first parameter and an iterator as the second parameter

Shouldn't there be a ranges version that takes two ranges? upcoming c++20 std::ranges::is_permutation takes two ranges as params: https://eel.is/c++draft/alg.is.permutation