EnTT 3.14.0
|
Function object to wrap std::sort
in a class type.
More...
#include <algorithm.hpp>
Public Member Functions | |
template<typename It , typename Compare = std::less<>, typename... Args> | |
void | operator() (It first, It last, Compare compare=Compare{}, Args &&...args) const |
Sorts the elements in a range. | |
Function object to wrap std::sort
in a class type.
Unfortunately, std::sort
cannot be passed as template argument to a class template or a function template.
This class fills the gap by wrapping some flavors of std::sort
in a function object.
Definition at line 21 of file algorithm.hpp.
|
inline |
Sorts the elements in a range.
Sorts the elements in a range using the given binary comparison function.
It | Type of random access iterator. |
Compare | Type of comparison function object. |
Args | Types of arguments to forward to the sort function. |
first | An iterator to the first element of the range to sort. |
last | An iterator past the last element of the range to sort. |
compare | A valid comparison function object. |
args | Arguments to forward to the sort function, if any. |
Definition at line 36 of file algorithm.hpp.