summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
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/include/vector
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/include/vector')
-rw-r--r--libcxx/include/vector16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 65a087cf80c..c168c8ea60a 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -553,7 +553,11 @@ public:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __x)
+#if _LIBCPP_STD_VER > 14
+ _NOEXCEPT;
+#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+#endif
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __x, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
@@ -1220,7 +1224,11 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
vector<_Tp, _Allocator>::vector(vector&& __x)
+#if _LIBCPP_STD_VER > 14
+ _NOEXCEPT
+#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+#endif
: __base(_VSTD::move(__x.__alloc()))
{
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -2195,7 +2203,11 @@ public:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __v)
+#if _LIBCPP_STD_VER > 14
+ _NOEXCEPT;
+#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+#endif
vector(vector&& __v, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
vector& operator=(vector&& __v)
@@ -2785,7 +2797,11 @@ vector<bool, _Allocator>::operator=(const vector& __v)
template <class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
vector<bool, _Allocator>::vector(vector&& __v)
+#if _LIBCPP_STD_VER > 14
+ _NOEXCEPT
+#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+#endif
: __begin_(__v.__begin_),
__size_(__v.__size_),
__cap_alloc_(__v.__cap_alloc_)
OpenPOWER on IntegriCloud