We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm-project/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
Line 153 in 24a8041
This gets passed to std::inplace_merge but that requires an ordering comparison, not an equality predicate.
std::inplace_merge
I think the fix is simply:
--- a/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp +++ b/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp @@ -150,7 +150,7 @@ main() test_by_type<MemoryChecker>( [](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2)}; }, [](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2 + 1)}; }, - [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() == val2.value(); }); + [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() < val2.value(); }); EXPECT_FALSE(MemoryChecker::alive_objects() < 0, "wrong effect from inplace_merge: number of ctors calls < num of dtors calls"); EXPECT_FALSE(MemoryChecker::alive_objects() > 0, "wrong effect from inplace_merge: number of ctors calls > num of dtors calls");
The text was updated successfully, but these errors were encountered:
[pstl] Fix comparison function passed to std::inplace_merge
8639089
This needs to be an ordering, not an equality comparison. Fixes llvm#80217
Successfully merging a pull request may close this issue.
llvm-project/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
Line 153 in 24a8041
This gets passed to
std::inplace_merge
but that requires an ordering comparison, not an equality predicate.I think the fix is simply:
The text was updated successfully, but these errors were encountered: