3#ifndef TETL_ALGORITHM_INPLACE_MERGE_HPP
4#define TETL_ALGORITHM_INPLACE_MERGE_HPP
24template <
typename B
idirIt,
typename Compare>
29 while (left != mid and right !=
end) {
30 if (comp(*right, *left)) {
43template <
typename B
idirIt>
44constexpr auto inplace_merge(BidirIt first, BidirIt mid, BidirIt last) ->
void
constexpr auto move(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Moves the elements in the range [first, last), to another range beginning at destination,...
Definition move.hpp:26
constexpr auto move_backward(BidirIt1 first, BidirIt1 last, BidirIt2 destination) -> BidirIt2
Moves the elements from the range [first, last), to another range ending at destination....
Definition move_backward.hpp:24
constexpr auto inplace_merge(BidirIt begin, BidirIt mid, BidirIt end, Compare comp) -> void
Merges two consecutive sorted ranges [first, middle) and [middle, last) into one sorted range [first,...
Definition inplace_merge.hpp:25
constexpr auto end(C &c) -> decltype(c.end())
Returns an iterator to the end (i.e. the element after the last element) of the given container c or ...
Definition end.hpp:14
constexpr auto begin(C &c) -> decltype(c.begin())
Returns an iterator to the beginning of the given container c or array array. These templates rely on...
Definition begin.hpp:20
Definition adjacent_find.hpp:8
Function object for performing comparisons. Unless specialised, invokes operator< on type T....
Definition less.hpp:14