You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation
Peter Collingbourne 27c341db41 Fix the BinaryPredicate form of std::is_permutation to not rely on operator==
According to [1], forms 2 and 4 of std::is_permutation should use the passed in
binary predicate to compare elements. operator== should only be used for forms
1 and 3 which do not take a binary predicate.

This CL fixes forms 2 and 4 which relied on operator== for some comparisons.

[1] http://en.cppreference.com/w/cpp/algorithm/is_permutation

Patch by Thomas Anderson!

Differential Revision: https://reviews.llvm.org/D42518

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323563 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
is_permutation.pass.cpp Some of the tests from earlier today had 'int' as the return type when it should have been 'bool'. Fix that. It doesn't change the behavior of any of the tests, but it's more accurate. 8 years ago
is_permutation_pred.pass.cpp Fix the BinaryPredicate form of std::is_permutation to not rely on operator== 8 years ago