summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
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
commit71ff7c3f0f8f76b1e82748e5f690f51fc3d84662 (patch)
tree69199d21a6f4aa1ec380ffce0892379d64fb2bca /libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
parenta04e6b1853561f79d648e12aca251b208716262e (diff)
downloadbcm5719-llvm-71ff7c3f0f8f76b1e82748e5f690f51fc3d84662.tar.gz
bcm5719-llvm-71ff7c3f0f8f76b1e82748e5f690f51fc3d84662.zip
Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z
llvm-svn: 242148
Diffstat (limited to 'libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp')
-rw-r--r--libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
index ab32bd0677b..132186b555f 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
+++ b/libcxx/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
}
OpenPOWER on IntegriCloud