[all-commits] [llvm/llvm-project] b07b5b: [libc++] Test that our algorithms never copy a use...
Quuxplusone via All-commits
all-commits at lists.llvm.org
Fri Nov 19 12:08:42 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b07b5bd72716625e0976a84d23652d94d8d0165a
https://github.com/llvm/llvm-project/commit/b07b5bd72716625e0976a84d23652d94d8d0165a
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: 2021-11-19 (Fri, 19 Nov 2021)
Changed paths:
M libcxx/include/__algorithm/binary_search.h
M libcxx/include/__algorithm/is_heap.h
M libcxx/include/__algorithm/is_heap_until.h
M libcxx/include/__algorithm/is_sorted.h
M libcxx/include/__algorithm/is_sorted_until.h
M libcxx/include/__algorithm/max.h
M libcxx/include/__algorithm/max_element.h
M libcxx/include/__algorithm/min.h
M libcxx/include/__algorithm/min_element.h
A libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp
M libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp
M libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp
Log Message:
-----------
[libc++] Test that our algorithms never copy a user-provided comparator.
This is not mandated by the standard, so it goes in libcxx/test/libcxx/.
It's certainly arguable that the algorithms changed here
(`is_heap`, `is_sorted`, `min`, `max`) are harmless and we should
just let them copy their comparators once. But at the same time,
it's nice to have all our algorithms be 100% consistent and never
copy a comparator, not even once.
Differential Revision: https://reviews.llvm.org/D114136
More information about the All-commits
mailing list