4#include "../Foundation/TypeTraits.h"
24 constexpr bool operator()(
const T& a,
const T& b) {
return a < b; }
33template <typename Iterator, typename BinaryPredicate = smallerThan<typename TypeTraits::RemovePointer<Iterator>::type>>
34constexpr void bubbleSort(Iterator first, Iterator last, BinaryPredicate predicate = BinaryPredicate())
45 Iterator p1 = first + 1;
48 if (predicate(*p1, *p0))
constexpr void bubbleSort(Iterator first, Iterator last, BinaryPredicate predicate=BinaryPredicate())
Sorts iterator range according to BinaryPredicate (bubble sort).
Definition: AlgorithmBubbleSort.h:34
constexpr void swap(T &t1, T &t2)
Swaps the values of two objects.
Definition: Compiler.h:282
Functor that evaluates to a < b
Definition: AlgorithmBubbleSort.h:19
constexpr bool operator()(const T &a, const T &b)
Returns true if a < b
Definition: AlgorithmBubbleSort.h:24