This allows types to be considered trivially equality comparable if a defaulted hidden friend is used.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Is this a builtin that is supposed to model something in the standard? It isn't clear to me how this one is supposed to work.
clang/test/SemaCXX/type-traits.cpp | ||
---|---|---|
3439 | Is there a reason these tests need to be c++20 only? |
Comment Actions
No, this is for optimization purposes. It is true when it is know that comparing two instances of T is equivalent to a memcmp. Or in other words every bit in the type is part of its value representation. Does that help?
clang/test/SemaCXX/type-traits.cpp | ||
---|---|---|
3439 | Defaulted equality comparison is a C++20 feature. |
Comment Actions
I found the patch a few months ago where you added this, so I'm more knowledgeable now.
clang/test/SemaCXX/type-traits.cpp | ||
---|---|---|
3439 | Ah, right, thanks! |
Is there a reason these tests need to be c++20 only?