This template does comparison that has no well-defined semantics in language. You almost never want such code in standard library unless it was proven to be truly idiomatic. If your implementation requires such behaviour, it can be made private. Detailed comment about expected semantics is needed anyway.