From 119ed479997f73f39aa0dc4ea5b5ca5ae36300fb Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 14 Jul 2015 14:46:32 +0000 Subject: Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242148 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp | 5 +++++ .../containers/sequences/vector/vector.cons/move_noexcept.pass.cpp | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'test') diff --git a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp index ab32bd067..132186b55 100644 --- a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp @@ -43,7 +43,12 @@ int main() } { typedef std::vector> C; + // In C++17, move constructors for allocators are not allowed to throw +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_constructible::value, ""); +#else static_assert(!std::is_nothrow_move_constructible::value, ""); +#endif } #endif } diff --git a/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp index 46cad9925..b7bbfaa42 100644 --- a/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp @@ -44,7 +44,12 @@ int main() } { typedef std::vector> C; + // In C++17, move constructors for allocators are not allowed to throw +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_constructible::value, ""); +#else static_assert(!std::is_nothrow_move_constructible::value, ""); +#endif } #endif } -- cgit v1.2.3