In the old days with C, the sorting algorithm did use a compare function that returns 0, -1 or 1. Apparently, in C++, it is expecting a bool return. I don't know for sure for Wind River C++ but I checked with the Microsoft Visual C++ and it does say the compare function is expected to return bool. I did change the compare function to return bool and it is much more reliable now.
http://msdn.microsoft.com/en-us/libr...h1(VS.71).aspx
Quote:
_Comp
User-defined predicate function object that defines the comparison criterion to be satisfied by successive elements in the ordering. A binary predicate takes two arguments and returns true when satisfied and false when not satisfied.
|