sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
(no source file, everything inside header)
template ‹typename T› class SGLMoreThan;
part of SGEXTN module SG_Containers
descending comparator struct for use with SGEXTN Containers
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGLMoreThan.h›
CMake target for BuildLah: SGEXTN::SG_Containers
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
[[nodiscard]] bool operator()(const T& a, const T& b) const;
SGLMoreThan provides a descending comparator struct for use with SGEXTN Containers, this can be used when using SGLPriorityQueue, SGLSet, SGLMultiSet, or SGLMap. You need operator› defined to use SGLMoreThan with custom structs. SGLLesserThan works with any object pointers. This is a template based class with no separate source file.
SGLMoreThan calls operator› on the corresponding data type if it is a custom struct. For object pointers, direct comparison is undefined behaviour if they are not allocated in the same C array creation call, so SGLMoreThan converts them to bytes first and compares the bytes.
Returns if a is more than b.
This is internally used by SGLPriorityQueue, SGLSet, SGLMultiSet, and SGLMap when SGLMoreThan is selected as the comparator struct.
The presense of operator() makes SGLMoreThan a functor.
This will not compile if operator› is not defined for T. Check the source code of any SGEXTN struct (SGXChar, SGXString, SGXColourRGBA, SGXColourHSLA, SGXIdentifier, SGXTimeStamp, SGXVector2) to see how to define operator›.
©2025 05524F.sg (Singapore)