4#include "../Foundation/PrimitiveTypes.h"
13template <
class T>
struct RemovePointer<T*> {
using type = T; };
14template <
class T>
struct RemovePointer<T**> {
using type = T; };
33 constexpr bool operator()(
const T& a,
const T& b) {
return a < b; }
42template <typename Iterator, typename BinaryPredicate = smallerThan<typename TypeTraits::RemovePointer<Iterator>::type>>
43constexpr void bubbleSort(Iterator first, Iterator last, BinaryPredicate predicate = BinaryPredicate())
54 Iterator p1 = first + 1;
57 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:43
constexpr void swap(T &t1, T &t2)
Swaps the values of two objects.
Definition Compiler.h:270
Functor that evaluates to a < b
Definition AlgorithmBubbleSort.h:28
constexpr bool operator()(const T &a, const T &b)
Returns true if a < b
Definition AlgorithmBubbleSort.h:33
RemovePointer removes the pointer qualification from a type T.
Definition AlgorithmBubbleSort.h:12