From 9cbee430da220344bd4d78067299e48270cf716f Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 2 Sep 2011 20:42:31 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20const=20correctness=20bug=20in=20=5F=5Fmo?= =?UTF-8?q?ve=5Fassign.=20=20Found=20and=20fixed=20by=20Ion=20Gaztan=CC=83?= =?UTF-8?q?aga.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139032 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__split_buffer | 4 ++-- include/deque | 4 ++-- include/list | 4 ++-- include/string | 6 +++--- include/vector | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/__split_buffer b/include/__split_buffer index dbf3ce01..d5b8f0a3 100644 --- a/include/__split_buffer +++ b/include/__split_buffer @@ -141,14 +141,14 @@ public: private: _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __split_buffer& __c, true_type) + void __move_assign_alloc(__split_buffer& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { __alloc() = _VSTD::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __split_buffer& __c, false_type) _NOEXCEPT + void __move_assign_alloc(__split_buffer& __c, false_type) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY diff --git a/include/deque b/include/deque index 69682a16..87cbe599 100644 --- a/include/deque +++ b/include/deque @@ -977,14 +977,14 @@ protected: private: _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __deque_base& __c, true_type) + void __move_assign_alloc(__deque_base& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { __alloc() = _VSTD::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __deque_base& __c, false_type) _NOEXCEPT + void __move_assign_alloc(__deque_base& __c, false_type) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY diff --git a/include/list b/include/list index fa515e0b..900e2ec9 100644 --- a/include/list +++ b/include/list @@ -444,14 +444,14 @@ private: {} _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __list_imp& __c, true_type) + void __move_assign_alloc(__list_imp& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) { __node_alloc() = _VSTD::move(__c.__node_alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __list_imp& __c, false_type) + void __move_assign_alloc(__list_imp& __c, false_type) _NOEXCEPT {} }; diff --git a/include/string b/include/string index a1dba310..2041510f 100644 --- a/include/string +++ b/include/string @@ -1593,7 +1593,7 @@ private: _LIBCPP_INLINE_VISIBILITY void - __move_assign_alloc(const basic_string& __str) + __move_assign_alloc(basic_string& __str) _NOEXCEPT_( !__alloc_traits::propagate_on_container_move_assignment::value || is_nothrow_move_assignable::value) @@ -1601,14 +1601,14 @@ private: __alloc_traits::propagate_on_container_move_assignment::value>());} _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const basic_string& __c, true_type) + void __move_assign_alloc(basic_string& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { __alloc() = _VSTD::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const basic_string& __c, false_type) + void __move_assign_alloc(basic_string& __c, false_type) _NOEXCEPT {} diff --git a/include/vector b/include/vector index 43a67d8f..348fe4af 100644 --- a/include/vector +++ b/include/vector @@ -160,7 +160,7 @@ public: vector() noexcept(is_nothrow_default_constructible::value); - explicit vector(const allocator_type& = allocator_type()); + explicit vector(const allocator_type&); explicit vector(size_type n, const value_type& value = value_type(), const allocator_type& = allocator_type()); template vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type()); @@ -402,14 +402,14 @@ private: {} _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __vector_base& __c, true_type) + void __move_assign_alloc(__vector_base& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { __alloc() = _VSTD::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const __vector_base& __c, false_type) + void __move_assign_alloc(__vector_base& __c, false_type) _NOEXCEPT {} @@ -2087,14 +2087,14 @@ private: {__move_assign_alloc(__c, integral_constant());} _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const vector& __c, true_type) + void __move_assign_alloc(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { __alloc() = _VSTD::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(const vector& __c, false_type) + void __move_assign_alloc(vector& __c, false_type) _NOEXCEPT {}