Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82132 - sandbox/static_vector/boost/container
From: adam.wulkiewicz_at_[hidden]
Date: 2012-12-20 22:41:45


Author: awulkiew
Date: 2012-12-20 22:41:45 EST (Thu, 20 Dec 2012)
New Revision: 82132
URL: http://svn.boost.org/trac/boost/changeset/82132

Log:
Two versions of swap_dispatch() added. Headers and comments cleaned.
Text files modified:
   sandbox/static_vector/boost/container/static_vector.hpp | 32 +++++++++++++++++++++-----------
   1 files changed, 21 insertions(+), 11 deletions(-)

Modified: sandbox/static_vector/boost/container/static_vector.hpp
==============================================================================
--- sandbox/static_vector/boost/container/static_vector.hpp (original)
+++ sandbox/static_vector/boost/container/static_vector.hpp 2012-12-20 22:41:45 EST (Thu, 20 Dec 2012)
@@ -100,9 +100,14 @@
 template <typename Value, std::size_t Capacity, typename Strategy = static_vector_detail::default_strategy<> >
 class static_vector
 {
+ typedef typename
+ static_vector_detail::static_vector_traits<
+ Value, Capacity, Strategy
+ >::size_type stored_size_type;
+
     BOOST_MPL_ASSERT_MSG(
- ( boost::is_unsigned<StoredSizeType>::value &&
- sizeof(typename boost::uint_value_t<Capacity>::least) <= sizeof(StoredSizeType) ),
+ ( boost::is_unsigned<stored_size_type>::value &&
+ sizeof(typename boost::uint_value_t<Capacity>::least) <= sizeof(stored_size_type) ),
         SIZE_TYPE_IS_TOO_SMALL,
         (static_vector)
     );
@@ -119,10 +124,7 @@
 
 public:
     typedef Value value_type;
- typedef typename
- typedef static_vector_detail::static_vector_traits<
- Value, Capacity, Strategy
- >::size_type size_type;
+ typedef stored_size_type size_type;
     typedef std::ptrdiff_t difference_type;
     typedef Value& reference;
     typedef Value const& const_reference;
@@ -716,20 +718,28 @@
         return (reinterpret_cast<const Value*>(m_storage.address()));
     }
 
- StoredSizeType m_size;
+ stored_size_type m_size;
     aligned_storage_type m_storage;
 };
 
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
-template<typename Value, typename StoredSizeType>
-class static_vector<Value, 0, StoredSizeType>
+template<typename Value, typename Strategy>
+class static_vector<Value, 0, Strategy>
 {
- typedef static_vector_detail::error_handling errh;
+ typedef typename
+ static_vector_detail::static_vector_traits<
+ Value, 0, Strategy
+ >::size_type stored_size_type;
+
+ typedef typename
+ static_vector_detail::static_vector_traits<
+ Value, 0, Strategy
+ >::strategy errh;
 
 public:
     typedef Value value_type;
- typedef std::size_t size_type;
+ typedef stored_size_type size_type;
     typedef std::ptrdiff_t difference_type;
     typedef Value& reference;
     typedef Value const& const_reference;


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