[cfe-commits] [libcxx] r139032 - in /libcxx/trunk/include: __split_buffer deque list string vector

Howard Hinnant hhinnant at apple.com
Fri Sep 2 13:42:31 PDT 2011


Author: hhinnant
Date: Fri Sep  2 15:42:31 2011
New Revision: 139032

URL: http://llvm.org/viewvc/llvm-project?rev=139032&view=rev
Log:
Fix const correctness bug in __move_assign.  Found and fixed by Ion Gaztañaga.

Modified:
    libcxx/trunk/include/__split_buffer
    libcxx/trunk/include/deque
    libcxx/trunk/include/list
    libcxx/trunk/include/string
    libcxx/trunk/include/vector

Modified: libcxx/trunk/include/__split_buffer
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__split_buffer?rev=139032&r1=139031&r2=139032&view=diff
==============================================================================
--- libcxx/trunk/include/__split_buffer (original)
+++ libcxx/trunk/include/__split_buffer Fri Sep  2 15:42:31 2011
@@ -141,14 +141,14 @@
 
 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<allocator_type>::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

Modified: libcxx/trunk/include/deque
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/deque?rev=139032&r1=139031&r2=139032&view=diff
==============================================================================
--- libcxx/trunk/include/deque (original)
+++ libcxx/trunk/include/deque Fri Sep  2 15:42:31 2011
@@ -977,14 +977,14 @@
 
 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<allocator_type>::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

Modified: libcxx/trunk/include/list
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/list?rev=139032&r1=139031&r2=139032&view=diff
==============================================================================
--- libcxx/trunk/include/list (original)
+++ libcxx/trunk/include/list Fri Sep  2 15:42:31 2011
@@ -444,14 +444,14 @@
         {}
 
     _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
         {}
 };

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=139032&r1=139031&r2=139032&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Fri Sep  2 15:42:31 2011
@@ -1593,7 +1593,7 @@
 
     _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<allocator_type>::value)
@@ -1601,14 +1601,14 @@
                       __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<allocator_type>::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
         {}
 

Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=139032&r1=139031&r2=139032&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Fri Sep  2 15:42:31 2011
@@ -160,7 +160,7 @@
 
     vector()
         noexcept(is_nothrow_default_constructible<allocator_type>::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 <class InputIterator>
         vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
@@ -402,14 +402,14 @@
         {}
 
     _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<allocator_type>::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 @@
         {__move_assign_alloc(__c, integral_constant<bool,
                       __storage_traits::propagate_on_container_move_assignment::value>());}
     _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<allocator_type>::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
         {}
 





More information about the cfe-commits mailing list