Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++][test] Avoid MSVC constexpr bug
C++ constexpr allows a non-constant-expresssion lvalue to be used in a constant expression if it's not subject to lvalue-to-rvalue conversion. Subtly, this means you can make a constant-expression copy of a non-constant-expression object of empty type since the copy constructor doesn't perform lvalue-to-rvalue conversion. MSVC has had bugs with this usage forever, which will hopefully finally be mashed implementing C++23's relaxation on the use of pointers and references in constant expressions. There's no need for this particular test to use this particular constexpr feature, we can simply make the predicates constant expressions. Differential Revision: https://reviews.llvm.org/D141336
- Loading branch information