Skip to content

Commit bf052af

Browse files
Fix MSVC warning C4127 "conditional expression is constant".
1 parent 9f1f50a commit bf052af

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
439439
types::for_each(types::forward_iterator_list<int*>(), TestIter());
440440

441441
#if TEST_STD_VER >= 11
442-
if (TEST_STD_VER >= 23 || !TEST_IS_CONSTANT_EVALUATED)
442+
if (TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED)
443443
types::for_each(types::forward_iterator_list<std::unique_ptr<int>*>(), TestUniquePtr());
444444
#endif
445445

libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
144144

145145
#if TEST_STD_VER >= 11
146146
// We can't test unique_ptr in constant evaluation before C++23 as it's constexpr only since C++23.
147-
if (TEST_STD_VER >= 23 || !TEST_IS_CONSTANT_EVALUATED)
147+
if (TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED)
148148
types::for_each(types::forward_iterator_list<std::unique_ptr<int>*>(), TestUniquePtr());
149149
#endif
150150

libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
137137
static_assert(noexcept(std::swap(ma, ma)), "");
138138
}
139139

140-
if (TEST_STD_VER >= 23 || !TEST_IS_CONSTANT_EVALUATED)
140+
if (TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED)
141141
test_unique_ptr();
142142
#endif
143143

0 commit comments

Comments
 (0)