Fixes #54803
Fixes #53133
Details
- Reviewers
ldionne Mordante var-const - Group Reviewers
Restricted Project - Commits
- rGa29a1a33ac7b: [libc++] Fix conjunction/disjunction and mark a few LWG issues as complete
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/utilities/meta/meta.logical/conjunction.compile.pass.cpp | ||
---|---|---|
2 | I think we are missing tests for conjunction and disjunction with types that don't have a ::value but should never be instantiated because of short-circuiting. | |
71 | We should be testing that is_base_of instead, since that's what the spec requests. Same for disjunction. |
libcxx/include/__type_traits/conjunction.h | ||
---|---|---|
27 | It would be more idiomatic to use using type = ...; here and below. | |
libcxx/include/type_traits | ||
481–487 | I would consider moving these helpers to conjunction.h and disjunction.h in the future, with a small comment explaining how they differ from disjunction and conjunction. | |
libcxx/test/std/utilities/meta/meta.logical/conjunction.compile.pass.cpp | ||
8 | Can you please make sure that we have coverage for all the cases that were reported in https://github.com/llvm/llvm-project/issues/54803? The bug report has some nice tests we can easily add to our test suite in one form or another. | |
10 | From live review: let's also make sure we allow types that have only an explicit cast to bool, since the standard says bool(Bi::value) (https://eel.is/c++draft/meta.logical). | |
77 | Please add something like static_assert(!std::conjunction<False, HasNoValue, True>::value); We need to make sure that we can instantiate it, not only use is_base_of on it (yes, I know is_base_of will instantiate it, but that's only how our implementation works). Same applies for disjunction. |
It would be more idiomatic to use using type = ...; here and below.