diff --git a/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp b/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp --- a/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp @@ -68,41 +68,43 @@ } } -template -constexpr bool testConstructorArray() -{ - std::array val = { U(), U() }; - ASSERT_NOEXCEPT(std::span {val}); - ASSERT_NOEXCEPT(std::span{val}); - std::span s1{val}; - std::span s2{val}; - return s1.data() == &val[0] && s1.size() == 2 - && s2.data() == &val[0] && s2.size() == 2; +template +constexpr bool testConstructorArray() { + std::array val = {U(), U()}; + ASSERT_NOEXCEPT(std::span{val}); + ASSERT_NOEXCEPT(std::span{val}); + std::span s1{val}; + std::span s2{val}; + return s1.data() == &val[0] && s1.size() == 2 && s2.data() == &val[0] && + s2.size() == 2; } -template -constexpr bool testConstructorConstArray() -{ - const std::array val = { U(), U() }; - ASSERT_NOEXCEPT(std::span {val}); - ASSERT_NOEXCEPT(std::span{val}); - std::span s1{val}; - std::span s2{val}; - return s1.data() == &val[0] && s1.size() == 2 - && s2.data() == &val[0] && s2.size() == 2; +template +constexpr bool testConstructorConstArray() { + const std::array val = {U(), U()}; + ASSERT_NOEXCEPT(std::span{val}); + ASSERT_NOEXCEPT(std::span{val}); + std::span s1{val}; + std::span s2{val}; + return s1.data() == &val[0] && s1.size() == 2 && s2.data() == &val[0] && + s2.size() == 2; } template constexpr bool testConstructors() { - static_assert(testConstructorArray(), ""); - static_assert(testConstructorArray(), ""); - static_assert(testConstructorConstArray(), ""); - static_assert(testConstructorConstArray(), ""); - - return testConstructorArray() - && testConstructorArray() - && testConstructorConstArray() - && testConstructorConstArray(); + static_assert(testConstructorArray(), ""); + static_assert(testConstructorArray(), ""); + static_assert(testConstructorArray(), ""); + static_assert(testConstructorConstArray(), ""); + static_assert(testConstructorConstArray(), ""); + static_assert(testConstructorConstArray(), ""); + + return testConstructorArray() && + testConstructorArray() && + testConstructorArray() && + testConstructorConstArray() && + testConstructorConstArray() && + testConstructorConstArray(); } struct A{}; @@ -115,9 +117,7 @@ assert(testConstructors()); assert(testConstructors()); - assert(testConstructors()); assert(testConstructors()); - assert(testConstructors()); checkCV(); diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp @@ -133,11 +133,13 @@ static_assert(!std::is_assignable::value, ""); static_assert(!std::is_assignable::value, ""); } +#ifdef _LIBCPP_VERSION { using F1 = std::function; using F2 = std::function; static_assert(!std::is_assignable::value, ""); } +#endif #endif return 0; diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp @@ -74,7 +74,8 @@ assert(p2.get() == nullptr); } -#if TEST_STD_VER > 17 +#if TEST_STD_VER > 17 && defined(_LIBCPP_VERSION) + // This won't pass when LWG-2996 is implemented. { std::shared_ptr pA(new A); assert(pA.use_count() == 1);