[all-commits] [llvm/llvm-project] 8f859c: Use std::less instead of operator < in less_first ...
Akira Hatanaka via All-commits
all-commits at lists.llvm.org
Fri Aug 27 12:59:52 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8f859cc34966ede0054842cb5243536f9572b708
https://github.com/llvm/llvm-project/commit/8f859cc34966ede0054842cb5243536f9572b708
Author: Akira Hatanaka <ahatanaka at apple.com>
Date: 2021-08-27 (Fri, 27 Aug 2021)
Changed paths:
M llvm/include/llvm/ADT/STLExtras.h
Log Message:
-----------
Use std::less instead of operator < in less_first and less_second
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:
https://eel.is/c++draft/comparisons.general
Differential Revision: https://reviews.llvm.org/D108733
More information about the All-commits
mailing list