llvm.org GIT mirror llvm / 28772f1
STLExtras: add stable_sort wrappers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358893 91177308-0d34-0410-b5e6-96231b3b80d8 Fangrui Song 1 year, 5 months ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
13041304 std::forward(Value), C);
13051305 }
13061306
1307 template
1308 void stable_sort(R &&Range) {
1309 std::stable_sort(adl_begin(Range), adl_end(Range));
1310 }
1311
1312 template
1313 void stable_sort(R &&Range, Compare C) {
1314 std::stable_sort(adl_begin(Range), adl_end(Range), C);
1315 }
1316
13071317 /// Binary search for the first index where a predicate is true.
13081318 /// Returns the first I in [Lo, Hi) where C(I) is true, or Hi if it never is.
13091319 /// Requires that C is always false below some limit, and always true above it.