diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2018-12-07 22:16:26 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2018-12-07 22:16:26 +0000 |
| commit | 655fb4a76772f4a8970b9f87276aa1e979b3e468 (patch) | |
| tree | 7b547780c0d45e83f5349a3c62b90f76401e7155 /libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp | |
| parent | 5ab96bf57c55f7559f32e3dabb00b9db12ff2203 (diff) | |
| download | bcm5719-llvm-655fb4a76772f4a8970b9f87276aa1e979b3e468.tar.gz bcm5719-llvm-655fb4a76772f4a8970b9f87276aa1e979b3e468.zip | |
Update a couple of vector<bool> tests that were testing libc++-specific bahavior. Thanks to Andrey Maksimov for the catch.
llvm-svn: 348660
Diffstat (limited to 'libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp')
| -rw-r--r-- | libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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<bool> -// 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<bool> was not changed. + #include <vector> #include <cassert> @@ -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<typename C::allocator_type>::value), "" ); + LIBCPP_STATIC_ASSERT((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); #endif C c(a); LIBCPP_ASSERT(c.__invariants()); |

