According to the standard, if p1 and p2 are both pointers, p1 < p2 and p2 < p1 can both be false in theory in some cases:
https://eel.is/c++draft/expr.rel#4.3
std::less<void> yields a implementation-defined strict total order over pointers:
|  Differential  D108733  
Use std::less instead of operator < in less_first and less_second Authored by ahatanak on Aug 25 2021, 3:09 PM. 
Details According to the standard, if p1 and p2 are both pointers, p1 < p2 and p2 < p1 can both be false in theory in some cases: https://eel.is/c++draft/expr.rel#4.3 std::less<void> yields a implementation-defined strict total order over pointers: 
Diff Detail 
 Event TimelineComment Actions I don't know that it makes a difference in practice, but this definitely LGTM on principle. |