stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r587573 - /incubator/stdcxx/trunk/include/vector.cc
Date Tue, 23 Oct 2007 17:49:33 GMT
Author: faridz
Date: Tue Oct 23 10:49:33 2007
New Revision: 587573

URL: http://svn.apache.org/viewvc?rev=587573&view=rev
Log:
2007-10-23 Farid Zaripov <farid_zaripov@epam.com>

	Merged r587572 from branches/4.2.x with a fix for STDCXX-611
	* vector.cc (_C_insert_n): Use overloads of the uninitialized
	algorithms that take a reference to Allocator as the last argument.

Modified:
    incubator/stdcxx/trunk/include/vector.cc

Modified: incubator/stdcxx/trunk/include/vector.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/vector.cc?rev=587573&r1=587572&r2=587573&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/vector.cc (original)
+++ incubator/stdcxx/trunk/include/vector.cc Tue Oct 23 10:49:33 2007
@@ -268,6 +268,8 @@
 
     _RWSTD_ASSERT (_C_make_iter (__movbeg) == __it);
 
+    _C_value_alloc_type __alloc = _RWSTD_VALUE_ALLOC_CAST (*this);
+
     if (__movend <= _C_end) {
 
         // the end of the range of existing elements after being
@@ -281,7 +283,7 @@
 
         // construct copies of elements that will be moved beyond
         // the current end of the sequence controlled by *this
-        _STD::uninitialized_copy (__ucpbeg, _C_end, _C_end);
+        _STD::uninitialized_copy (__ucpbeg, _C_end, _C_end, __alloc);
 
         // advance end to maintain consistent state
         _C_end += __n;
@@ -298,7 +300,7 @@
         const size_type __n1 = size () - __size1;
         const size_type __n2 = __n - __n1;
 
-        _STD::uninitialized_fill_n (_C_end, __n2, __x);
+        _STD::uninitialized_fill_n (_C_end, __n2, __x, __alloc);
 
         const pointer __end = _C_end;
 
@@ -306,7 +308,7 @@
 
         // construct copies of the range of elements [pos, end)
         // past the end of the range of elements inserted above
-        _STD::uninitialized_copy (__movbeg, __end, _C_end);
+        _STD::uninitialized_copy (__movbeg, __end, _C_end, __alloc);
 
         _C_end += __end - __movbeg;
 



Mime
View raw message