[libcxx-commits] [PATCH] D127194: [libc++][ranges] Implement `ranges::is_permutation`

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 29 23:22:55 PDT 2022


var-const added inline comments.


================
Comment at: libcxx/include/__algorithm/is_permutation.h:149
 template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
 _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __is_permutation(_RandomAccessIterator1 __first1, _RandomAccessIterator2 __last1,
                                                     _RandomAccessIterator1 __first2, _RandomAccessIterator2 __last2,
----------------
I think this was a bug -- the type of `__last1` should be `_RandomAccessIterator1`, not `2`. This would only work if both iterator types are the same, IIUC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127194/new/

https://reviews.llvm.org/D127194



More information about the libcxx-commits mailing list