From 655fb4a76772f4a8970b9f87276aa1e979b3e468 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Fri, 7 Dec 2018 22:16:26 +0000 Subject: Update a couple of vector tests that were testing libc++-specific bahavior. Thanks to Andrey Maksimov for the catch. llvm-svn: 348660 --- .../sequences/vector.bool/construct_default.pass.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp') diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp index 0f51c219ee4..80bfce1ad9a 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ b/libcxx/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()); -- cgit v1.2.3