If your array contains raw pointers, they will be automatically dereferenced during sorting. Therefore, your predicate will be passed references rather than pointers. If this is not desirable, please use Algo::StableSort(MyArray, Predicate) directly instead. The auto-dereferencing behavior does not occur with smart pointers.