Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
a0549ee2 |
| 21-Oct-2022 |
Aaron Jacobs <jacobsa@google.com> |
[libc++] type_traits: fix short-circuiting in std::conjunction.
Replace the two-level implementation with a simpler one that directly subclasses the predicates, avoiding the instantiation of the tem
[libc++] type_traits: fix short-circuiting in std::conjunction.
Replace the two-level implementation with a simpler one that directly subclasses the predicates, avoiding the instantiation of the template to get the `type` member in a situation where we should short-circuit. This prevents incorrect diagnostics when the instantiated predicate contains a static assertion.
Add a test case that reproduced the previous problem. The existing test case involving `HasNoValue` didn't catch the problem because `HasNoValue` was in the final position. The bug comes up when the predicate that shouldn't be instantiated is after the short-circuit position but there is more to follow, because then `__conjunction_impl<False, BadPredicate, ...>` instantiates `__conjunction_impl<BadPredicate, ...>` (in order to obtain its `type` member), which in turn instantiates `BadPredicate` in order to obtain its `value` member.
In contrast the new implementation doesn't recurse in instantiation any further than it needs to, because it doesn't require particular members of the recursive case.
I've also updated the test cases for `std::disjunction` to match, although it doesn't have the same particular bug (its implementation is quite different).
Fixes #58490.
Reviewed By: #libc, ldionne, philnik
Spies: philnik, ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D136318
show more ...
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
a29a1a33 |
| 03-Jun-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Fix conjunction/disjunction and mark a few LWG issues as complete
Fixes #54803 Fixes #53133
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://revie
[libc++] Fix conjunction/disjunction and mark a few LWG issues as complete
Fixes #54803 Fixes #53133
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D125221
show more ...
|