Following the example from the docs, this works:
array<int> arr = {3,2,1};
arr.sort(function(a,b) { return a < b; });
I would expect the following to work:
bool less(int a, int b) { return a < b; }
...
array<int> arr = {3,2,1};
arr.sort(less);
but instead it errors:
ERROR : No matching signatures to 'array::sort(::less)'
INFORMATION : Candidates are:
INFORMATION : void array::sort(less&in, uint startAt = 0, uint count = uint ( - 1 ))
How do I pass array.sort an existing function instead of an anonymous function? I'm using Angelscript 2.32.0