#include <sort.h>
详细描述
template<typename COMPARE = DefaultCompare, BASESORTFLAGS FLAGS = BASESORTFLAGS::NONE>
class maxon::SimpleSort< COMPARE, FLAGS >
Specialized
BaseSort
template for simple datatypes.
-
Template Parameters
-
COMPARE
|
Class
that offers the methods IsEqual and LessThan.
|
FLAGS
|
See BASESORTFLAGS.
|
-
注意
-
Note that the classes that will be sorted have special requirements regarding
copy and move constructors
.
-
Note that the comparison must fulfill the condition (a < b) == !(b < a). If this is not the case the sort algorithm will crash. To avoid mistakes when comparing tuples use LexicographicalCompare.
范例:
BaseArray<Int> array;
SimpleSort<> test;
test.Sort(array);