Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81977 - sandbox-branches/geometry/index/boost/geometry/extensions/index
From: adam.wulkiewicz_at_[hidden]
Date: 2012-12-15 14:31:45


Author: awulkiew
Date: 2012-12-15 14:31:45 EST (Sat, 15 Dec 2012)
New Revision: 81977
URL: http://svn.boost.org/trac/boost/changeset/81977

Log:
static_vector helper method uninitialized_copy(Val, It) changed to uninitialized_fill(It, Val).
Text files modified:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp | 18 ++++++++++--------
   1 files changed, 10 insertions(+), 8 deletions(-)

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp 2012-12-15 14:31:45 EST (Sat, 15 Dec 2012)
@@ -65,6 +65,7 @@
     }
 
     // strong
+ //template <typename Value>
     static_vector(size_type s, value_type const& value)
         : m_size(0)
     {
@@ -120,6 +121,7 @@
     }
 
     // strong
+ //template <typename Value>
     void resize(size_type s, value_type const& value)
     {
         if ( s < m_size )
@@ -144,11 +146,11 @@
 
     // strong
     //template <typename Value>
- void push_back(Value const& value)
+ void push_back(value_type const& value)
     {
         BOOST_ASSERT_MSG(m_size < Capacity, "size can't exceed the capacity");
         //if ( Capacity <= m_size ) throw std::bad_alloc();
- this->uninitialized_copy(value, this->end()); // may throw
+ this->uninitialized_fill(this->end(), value); // may throw
         ++m_size; // update end
     }
 
@@ -297,7 +299,7 @@
         try
         {
             for ( ; first != last ; ++it, ++first, ++s )
- this->uninitialized_copy(*first, it); // may throw
+ this->uninitialized_fill(it, *first); // may throw
             m_size = s; // update end
         }
         catch(...)
@@ -369,10 +371,10 @@
         std::uninitialized_copy(first, last, dst); // may throw
     }
 
- // uninitialized_copy
+ // uninitialized_fill
 
     template <typename V>
- void uninitialized_copy(V const& v, iterator dst)
+ void uninitialized_fill(iterator dst, V const& v)
     {
         typedef typename
             mpl::and_<
@@ -381,17 +383,17 @@
>::type
         use_memcpy;
 
- uninitialized_copy_dispatch(v, dst, use_memcpy()); // may throw
+ uninitialized_fill_dispatch(dst, v, use_memcpy()); // may throw
     }
 
- void uninitialized_copy_dispatch(value_type const& v, value_type * ptr,
+ void uninitialized_fill_dispatch(value_type * ptr, value_type const& v,
                                      boost::mpl::bool_<true> const& /*use_memcpy*/)
     {
         ::memcpy(ptr, &v, sizeof(value_type));
     }
 
     template <typename V>
- void uninitialized_copy_dispatch(V const& v, value_type * ptr,
+ void uninitialized_fill_dispatch(value_type * ptr, V const& v,
                                      boost::mpl::bool_<false> const& /*use_memcpy*/)
     {
         new (ptr) value_type(v); // may throw


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk