1 #ifndef ENTT_CORE_ALGORITHM_HPP 2 #define ENTT_CORE_ALGORITHM_HPP 35 template<
typename It,
typename Compare = std::less<>,
typename... Args>
36 void operator()(It first, It last, Compare compare = Compare{}, Args &&... args)
const {
37 std::sort(std::forward<Args>(args)..., std::move(first), std::move(last), std::move(compare));
55 template<
typename It,
typename Compare = std::less<>>
56 void operator()(It first, It last, Compare compare = Compare{})
const {
63 while(pre != first && compare(value, *(pre-1))) {
90 template<
typename It,
typename Compare = std::less<>>
91 void operator()(It first, It last, Compare compare = Compare{})
const {
95 while(first != last) {
96 if(compare(*first, *it)) {
98 std::swap(*first, *it);
111 #endif // ENTT_CORE_ALGORITHM_HPP Function object for performing bubble sort (single iteration).
void operator()(It first, It last, Compare compare=Compare{}) const
Tries to sort the elements in a range.
Function object for performing insertion sort.
Function object to wrap std::sort in a class type.
void operator()(It first, It last, Compare compare=Compare{}) const
Sorts the elements in a range.
void operator()(It first, It last, Compare compare=Compare{}, Args &&... args) const
Sorts the elements in a range.