[PATCH] D58886: [ADT] Add llvm::binary_search to STLExtras
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 07:01:02 PST 2019
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
I guess maybe we have unit testsn for some but not all of these wrappers - might be worth checking/sampling to see what the prevailing trend is (I tend to be over-enthusiastic about testing, but I realize these simple wrappers are pretty uneventful)
================
Comment at: include/llvm/ADT/STLExtras.h:1313
+bool binary_search(R &&Range, const E &Element, Compare C) {
+ return std::binary_search(adl_begin(Range), adl_end(Range), Element, C);
+}
----------------
std::move(C), just in case it's cheaper to move?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58886/new/
https://reviews.llvm.org/D58886
More information about the llvm-commits
mailing list