[libcxx-commits] [PATCH] D101707: [libcxx][nfc] makes comparison operators for `std::*_ordering` types hidden friends
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 10 16:38:59 PDT 2021
Quuxplusone accepted this revision.
Quuxplusone added a comment.
This revision is now accepted and ready to land.
LGTM, but (re @zoecarver's comment)
Please do //not// mark this as "NFC", since in fact it has a significant effect on semantics: it makes the operators hidden friends!
Hidden friends are hidden (from non-ADL lookup); non-hidden friends are //not// hidden from non-ADL name lookup.
@zoecarver, an example program (which we are deliberately breaking and that's fine) would be, like, https://godbolt.org/z/75jM676hx
template<class T>
void f(bool (*fp)(T, std::partial_ordering)) {}
int main() {
f(std::operator<);
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101707/new/
https://reviews.llvm.org/D101707
More information about the libcxx-commits
mailing list