summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-07-14 14:46:32 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-07-14 14:46:32 +0000
commit119ed479997f73f39aa0dc4ea5b5ca5ae36300fb (patch)
treeb72435bad7f34620a3729d152268eb9d08cdf540 /test
parent7d914d1bfffac32da13a44871fc17b8ba3ade57a (diff)
downloadexternal_libcxx-119ed479997f73f39aa0dc4ea5b5ca5ae36300fb.tar.gz
external_libcxx-119ed479997f73f39aa0dc4ea5b5ca5ae36300fb.tar.bz2
external_libcxx-119ed479997f73f39aa0dc4ea5b5ca5ae36300fb.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp5
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp5
2 files changed, 10 insertions, 0 deletions
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<bool, some_alloc<bool>> 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<C>::value, "");
+#else
static_assert(!std::is_nothrow_move_constructible<C>::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<MoveOnly, some_alloc<MoveOnly>> 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<C>::value, "");
+#else
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
+#endif
}
#endif
}