diff --git a/test/std/containers/sequences/vector.bool/construct_default.pass.cpp b/test/std/containers/sequences/vector.bool/construct_default.pass.cpp index 0f51c219e..80bfce1ad 100644 --- a/test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ b/test/std/containers/sequences/vector.bool/construct_default.pass.cpp @@ -7,10 +7,15 @@ // //===----------------------------------------------------------------------===// -// // vector -// vector(const Alloc& = Alloc()); +// vector(); +// vector(const Alloc&); + +// This tests a conforming extension +// For vector<>, this was added to the standard by N4258, +// but vector was not changed. + #include #include @@ -24,9 +29,9 @@ void 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())), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); #endif C c; LIBCPP_ASSERT(c.__invariants()); @@ -45,9 +50,9 @@ void 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::value), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible::value), "" ); #endif C c(a); LIBCPP_ASSERT(c.__invariants()); diff --git a/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp index 4e71df374..e2d94e225 100644 --- a/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp @@ -6,6 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 // @@ -13,8 +14,9 @@ // noexcept(is_nothrow_default_constructible::value); // This tests a conforming extension +// For vector<>, this was added to the standard by N4258, +// but vector was not changed. -// UNSUPPORTED: c++98, c++03 #include #include @@ -40,7 +42,6 @@ int main() typedef std::vector> C; static_assert(std::is_nothrow_default_constructible::value, ""); } -#endif // _LIBCPP_VERSION { typedef std::vector> C; static_assert(!std::is_nothrow_default_constructible::value, ""); @@ -49,4 +50,5 @@ int main() typedef std::vector> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } +#endif // _LIBCPP_VERSION } diff --git a/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp b/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp index b244f75f2..f8c932a02 100644 --- a/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp @@ -6,15 +6,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 // // vector() // noexcept(is_nothrow_default_constructible::value); -// This tests a conforming extension +// This *was* a conforming extension, but it was adopted in N4258. -// UNSUPPORTED: c++98, c++03 #include #include