This allows std::equal and other algorithms be optimized better.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think this LGTM w/ comments applied, but I'd like to see it one last time w/ green CI and comments applied before we ship this.
libcxx/include/__exception/exception_ptr.h | ||
---|---|---|
1 | libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp is very very light, it doesn't even test for != -- can you add a test for that? | |
39 | Please add a comment explaining that this allows making the class trivially equality comparable. | |
libcxx/include/__expected/unexpected.h | ||
111 | Please add a comment like: // conforming extension: this is not observable beyond SFINAE but it allows making `unexpected` trivially comparable | |
libcxx/include/array | ||
262 | Same thing, please add a comment throughout whenever it's a public API. For example not in __wrap_iter. | |
libcxx/include/forward_list | ||
395 | No need for public:, we're already in public. Please check throughout. | |
libcxx/include/tuple | ||
1316 | Can you please ensure that we have tests for comparing tuples that contain reference types? |
libcxx/include/array | ||
---|---|---|
262 | ||
libcxx/include/tuple | ||
1345 | Conforming extension comment? | |
libcxx/test/libcxx/types_are_trivially_equality_comparable.compile.pass.cpp | ||
39 | Per your comment, you might be able to uncomment this now. | |
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp | ||
17 ↗ | (On Diff #524402) | About your CI issues, I think this might be a compiler bug: Works with all compilers: https://godbolt.org/z/Pc8bqczvo I think they should both work on all compilers. Edit: The problem seems to be that Clang and MSVC will instantiate operator== a bit too eagerly: https://godbolt.org/z/5hMKWzoMs, which triggers ADL on Holder<Incomplete>. |
Abandoning for now, since this requires some sort of compiler fix to work properly and this won't happen within the next month or so.
libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp is very very light, it doesn't even test for != -- can you add a test for that?