STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits.
Make vector.bool/construct_default.pass.cpp more portable. vector<bool>'s default ctor and allocator ctor aren't depicted as noexcept in the Working Paper. We're already directly including test_macros.h, so use LIBCPP_STATIC_ASSERT. http://reviews.llvm.org/D21871 Files: test/std/containers/sequences/vector.bool/construct_default.pass.cpp Index: test/std/containers/sequences/vector.bool/construct_default.pass.cpp =================================================================== --- test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ test/std/containers/sequences/vector.bool/construct_default.pass.cpp @@ -24,7 +24,7 @@ test0() { #if TEST_STD_VER > 14 - static_assert((noexcept(C{})), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C{})), "" ); #elif TEST_STD_VER >= 11 static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); #endif @@ -45,7 +45,7 @@ test1(const typename C::allocator_type& a) { #if TEST_STD_VER > 14 - static_assert((noexcept(C{typename C::allocator_type{}})), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C{typename C::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); #endif
Index: test/std/containers/sequences/vector.bool/construct_default.pass.cpp =================================================================== --- test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ test/std/containers/sequences/vector.bool/construct_default.pass.cpp @@ -24,7 +24,7 @@ test0() { #if TEST_STD_VER > 14 - static_assert((noexcept(C{})), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C{})), "" ); #elif TEST_STD_VER >= 11 static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); #endif @@ -45,7 +45,7 @@ test1(const typename C::allocator_type& a) { #if TEST_STD_VER > 14 - static_assert((noexcept(C{typename C::allocator_type{}})), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C{typename C::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); #endif
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits