@@ -695,7 +695,7 @@ template <typename RandomAccessIterator, typename Compare, typename Projection>
695695 */
696696template <
697697 std::random_access_iterator Iterator,
698- typename Compare = std::less<> ,
698+ typename Compare = std::ranges:: less,
699699 typename Projection = std::identity
700700>
701701 requires std::sortable<Iterator, Compare, Projection>
@@ -707,6 +707,22 @@ void timmerge(Iterator first, Iterator middle, Iterator last,
707707 GFX_TIMSORT_AUDIT (std::is_sorted (first, last, comp, proj) && " Postcondition" );
708708}
709709
710+ /* *
711+ * Stably merges two sorted halves [first, middle) and [middle, last) of a range into one
712+ * sorted range [first, last) with a comparison function and a projection function.
713+ */
714+ template <
715+ std::ranges::random_access_range Range,
716+ typename Compare = std::ranges::less,
717+ typename Projection = std::identity
718+ >
719+ requires std::sortable<std::ranges::iterator_t <Range>, Compare, Projection>
720+ void timmerge (Range &&range, std::ranges::iterator_t <Range> middle,
721+ Compare comp={}, Projection proj={})
722+ {
723+ gfx::timmerge (std::begin (range), middle, std::end (range), comp, proj);
724+ }
725+
710726/* *
711727 * Stably sorts a range with a comparison function and a projection function.
712728 */
0 commit comments