They do not need to be lambdas, but I believe it is the easiest method.
In standard C++, the lambda syntax actually produces a class with an overloaded operator()
. In this case you could add a
class FMyValueSort
{
public:
bool operator(float A, float B) const
{
return A < B;
}
};
somewhere (either in your .cpp or .h file) and do your sorting like so
FMyValueSort MyValueSort;
MyMap.ValueSort(MyValueSort);