[libcxx-commits] [libcxx] [libc++][test] Fix issues found by MSVC's STL (PR #131787)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 18 04:54:23 PDT 2025
================
@@ -438,9 +438,8 @@ TEST_CONSTEXPR_CXX20 bool test_vector_bool() {
TEST_CONSTEXPR_CXX20 bool test() {
types::for_each(types::forward_iterator_list<int*>(), TestIter());
-#if TEST_STD_VER >= 11
- if (TEST_STD_VER >= 23 || !TEST_IS_CONSTANT_EVALUATED)
- types::for_each(types::forward_iterator_list<std::unique_ptr<int>*>(), TestUniquePtr());
+#if TEST_STD_VER >= 11 && TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED
+ types::for_each(types::forward_iterator_list<std::unique_ptr<int>*>(), TestUniquePtr());
----------------
frederick-vs-ja wrote:
Oh, IIUC `TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED` is not a preprocess-time condition. (ditto below)
```suggestion
#if TEST_STD_VER >= 11
if (TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED)
types::for_each(types::forward_iterator_list<std::unique_ptr<int>*>(), TestUniquePtr());
```
https://github.com/llvm/llvm-project/pull/131787
More information about the libcxx-commits
mailing list