[libcxx-commits] [PATCH] D114136: [libc++] Test that our algorithms never copy a user-provided comparator.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 18 06:24:27 PST 2021
ldionne added inline comments.
================
Comment at: libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp:120
+ (void)std::is_sorted_until(first, last, Less(&copies)); assert(copies == 0);
+ if (!TEST_IS_CONSTANT_EVALUATED) (void)std::inplace_merge(first, mid, last, Less(&copies)); assert(copies == 0);
+ (void)std::lexicographical_compare(first, last, first2, last2, Less(&copies)); assert(copies == 0);
----------------
When/where was `TEST_IS_CONSTANT_EVALUATED` introduced? I seem to have missed it, but it certainly looks weird to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114136/new/
https://reviews.llvm.org/D114136
More information about the libcxx-commits
mailing list