3#ifndef TETL_ALGORITHM_BUBBLE_SORT_HPP
4#define TETL_ALGORITHM_BUBBLE_SORT_HPP
20template <
typename RandomIt,
typename Compare>
21constexpr auto bubble_sort(RandomIt first, RandomIt last, Compare comp) ->
void
23 for (
auto i = first; i != last; ++i) {
24 for (
auto j = first; j < i; ++j) {
38template <
typename RandomIt>
39constexpr auto bubble_sort(RandomIt first, RandomIt last) ->
void
constexpr auto bubble_sort(RandomIt first, RandomIt last, Compare comp) -> void
Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is...
Definition bubble_sort.hpp:21
constexpr auto iter_swap(ForwardIt1 a, ForwardIt2 b) -> void
Swaps the values of the elements the given iterators are pointing to.
Definition iter_swap.hpp:19
Definition adjacent_find.hpp:8
Function object for performing comparisons. Unless specialised, invokes operator< on type T....
Definition less.hpp:14