Each of these objects has a unique "_universal_id" value, and even in case (even though I don't see how that would happen) the object was compared to itself, the function returns false as it should.
"NONE" is a magic number which is just interpreted as no value.
I am aware of that, but the comparison involving that member is what happens in the worst scenarios. When I stated that each object has a unique value of that member, I wanted to disregard the property of "irreflexivity" ( as 2 objects will never be the same unless you're comparing the object to itself, which, even though I can't see why std::sort would compare an object to itself, would return False anyway).
I'm not understanding,
you consciously created a not strict weak ordering and wonder why the sort fails
or you observed that the sort fails, and blame it to the comparison function.
> the function is really simple
explain it.
By the way, ¿can you post the minimal amount of code needed to reproduce your problem?