Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82507 - in sandbox/static_vector: boost/container doc/generated doc/html doc/html/static_vector test
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-15 18:35:09


Author: awulkiew
Date: 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
New Revision: 82507
URL: http://svn.boost.org/trac/boost/changeset/82507

Log:
Some changes reverted. Stateful strategies support removed. Strategies are still in boost::container::strategy namespace.
Text files modified:
   sandbox/static_vector/boost/container/static_vector.hpp | 275 +++++++++++++--------------------------
   sandbox/static_vector/doc/generated/static_vector.qbk | 39 -----
   sandbox/static_vector/doc/generated/strategy_allocator_adaptor.qbk | 43 -----
   sandbox/static_vector/doc/generated/strategy_def.qbk | 4
   sandbox/static_vector/doc/html/index.html | 2
   sandbox/static_vector/doc/html/static_vector/reference.html | 256 ++----------------------------------
   sandbox/static_vector/test/static_vector_interprocess_test.cpp | 21 +--
   sandbox/static_vector/test/static_vector_test.cpp | 2
   8 files changed, 126 insertions(+), 516 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 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -37,16 +37,11 @@
 #include <boost/type_traits/alignment_of.hpp>
 #include <boost/type_traits/aligned_storage.hpp>
 
-#include <boost/type_traits/is_stateless.hpp>
-
 // TODO - use std::reverse_iterator and std::iterator_traits
 // instead Boost.Iterator to remove dependency?
 // or boost/detail/iterator.hpp ?
 #include <boost/iterator/reverse_iterator.hpp>
 
-// TODO statefull Strategy support
-// Members - co by Strategy nei zajmowala miejsca jesli nie potrzeba
-
 /**
  * @defgroup static_vector_non_member static_vector non-member functions (boost::container::)
  */
@@ -66,9 +61,9 @@
 // Could say
 // "cannot reserve(4) due to fixed capacity of 3 elements"
 
-//! @brief Default strategy.
+//! @brief The default strategy.
 //!
-//! @tparam Value Type of value stored in the container.
+//! @tparam Value Type of element stored in the container.
 template <typename Value>
 struct def
 {
@@ -86,15 +81,11 @@
     }
 };
 
-template <typename Value>
-bool operator==(def<Value> const&, def<Value> const&)
-{
- return true;
-}
-
-//! @brief Strategy adapted from allocator used to create a container object.
+//! @brief The strategy adapting info from passed Allocator.
+//!
+//! This strategy defines the same types that are defined in the Allocator.
 //!
-//! @tparam Allocator The type of allocator used to construct a container object.
+//! @tparam Allocator The Allocator which will be adapted.
 template <typename Allocator>
 struct allocator_adaptor
 {
@@ -106,28 +97,12 @@
     typedef typename Allocator::reference reference;
     typedef typename Allocator::const_reference const_reference;
 
- //! @brief The default constructor.
- allocator_adaptor() {}
-
- //! @brief The default constructor.
- //!
- //! @param alloc The allocator object used to construct a container object.
- explicit allocator_adaptor(Allocator const& alloc) : allocator(alloc) {}
-
     static void allocate_failed()
     {
         BOOST_ASSERT_MSG(false, "size can't exceed the capacity");
     }
-
- Allocator allocator;
 };
 
-template <typename Allocator>
-bool operator==(allocator_adaptor<Allocator> const& s1, allocator_adaptor<Allocator> const& s2)
-{
- return s1.allocator == s2.allocator;
-}
-
 } // namespace strategy
 
 namespace static_vector_detail {
@@ -199,61 +174,6 @@
     typedef boost::false_type use_optimized_swap;
 };
 
-template <typename Value, std::size_t Capacity, typename Strategy, bool IsStateless>
-struct members
-{
- typedef static_vector_detail::static_vector_traits<
- Value, Capacity, Strategy
- > vt;
-
- typedef typename vt::size_type size_type;
-
- typedef boost::aligned_storage<
- sizeof(Value[Capacity]),
- boost::alignment_of<Value[Capacity]>::value
- > aligned_storage_type;
-
- members() : size(0) {}
- members(Strategy const& st) : size(0), strategy(st) {}
- members(size_type s) : size(s) {}
- members(size_type s, Strategy const& st) : size(s), strategy(st) {}
-
- Strategy get_strategy() { return strategy; }
-
- size_type size;
- aligned_storage_type storage;
- Strategy strategy;
-};
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-template <typename Value, std::size_t Capacity, typename Strategy>
-struct members<Value, Capacity, Strategy, true>
-{
- typedef static_vector_detail::static_vector_traits<
- Value, Capacity, Strategy
- > vt;
-
- typedef typename vt::size_type size_type;
-
- typedef boost::aligned_storage<
- sizeof(Value[Capacity]),
- boost::alignment_of<Value[Capacity]>::value
- > aligned_storage_type;
-
- members() : size(0) {}
- members(Strategy const& st) : size(0){}
- members(size_type s) : size(s) {}
- members(size_type s, Strategy const& st) : size(s) {}
-
- Strategy get_strategy() { return Strategy(); }
-
- size_type size;
- aligned_storage_type storage;
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
 } // namespace static_vector_detail
 
 /**
@@ -279,7 +199,7 @@
  *
  * @par Advanced Usage
  * Error handling behavior can be modified to more closely match std::vector exception behavior
- * when exceeding bounds by providing an alternate Strategy and/or static_vector_traits specialization.
+ * when exceeding bounds by providing an alternate Strategy and static_vector_traits instantiation.
  *
  * @tparam Value The type of element that will be stored.
  * @tparam Capacity The maximum number of elements static_vector can store, fixed at compile time.
@@ -293,14 +213,9 @@
     typedef static_vector_detail::static_vector_traits<
         Value, Capacity, Strategy
> vt;
-
+
     typedef typename vt::error_handler errh;
 
- typedef static_vector_detail::members<
- Value, Capacity, Strategy,
- ::boost::is_stateless<Strategy>::value
- > members_type;
-
     BOOST_MPL_ASSERT_MSG(
         ( boost::is_unsigned<typename vt::size_type>::value &&
           sizeof(typename boost::uint_value_t<Capacity>::least) <= sizeof(typename vt::size_type) ),
@@ -310,6 +225,11 @@
 
     BOOST_CONCEPT_ASSERT((concept::StaticVectorStrategy<Strategy>));
 
+ typedef boost::aligned_storage<
+ sizeof(Value[Capacity]),
+ boost::alignment_of<Value[Capacity]>::value
+ > aligned_storage_type;
+
     template <typename V, std::size_t C, typename S>
     friend class static_vector;
 
@@ -362,17 +282,7 @@
     //! @par Complexity
     //! Constant O(1).
     static_vector()
- {}
-
- //! @brief Constructs an empty static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- static_vector(strategy_type const& s)
- : m_members(s)
+ : m_size(0)
     {}
 
     //! @pre <tt>count <= capacity()</tt>
@@ -390,6 +300,7 @@
     //! @par Complexity
     //! Linear O(N).
     explicit static_vector(size_type count)
+ : m_size(0)
     {
         this->resize(count); // may throw
     }
@@ -410,6 +321,7 @@
     //! @par Complexity
     //! Linear O(N).
     static_vector(size_type count, value_type const& value)
+ : m_size(0)
     {
         this->resize(count, value); // may throw
     }
@@ -433,6 +345,7 @@
     //! Linear O(N).
     template <typename Iterator>
     static_vector(Iterator first, Iterator last)
+ : m_size(0)
     {
         BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
         
@@ -449,7 +362,7 @@
     //! @par Complexity
     //! Linear O(N).
     static_vector(static_vector const& other)
- : m_members(other.size())
+ : m_size(other.size())
     {
         namespace sv = static_vector_detail;
         sv::uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw
@@ -471,7 +384,7 @@
     //! Linear O(N).
     template <std::size_t C, typename S>
     static_vector(static_vector<value_type, C, S> const& other)
- : m_members(other.size())
+ : m_size(other.size())
     {
         errh::check_capacity(*this, other.size()); // may throw
         
@@ -565,7 +478,7 @@
     //! Linear O(N).
     template <std::size_t C, typename S>
     static_vector(BOOST_RV_REF_3_TEMPL_ARGS(static_vector, value_type, C, S) other)
- : m_members(other.size())
+ : m_size(other.m_size)
     {
 // TODO - move only if pointers are the same
 
@@ -733,7 +646,7 @@
     {
         namespace sv = static_vector_detail;
 
- if ( count < m_members.size )
+ if ( count < m_size )
         {
             sv::destroy(this->begin() + count, this->end());
         }
@@ -743,7 +656,7 @@
 
             sv::uninitialized_fill(this->end(), this->begin() + count); // may throw
         }
- m_members.size = count; // update end
+ m_size = count; // update end
     }
 
     //! @pre <tt>count <= capacity()</tt>
@@ -764,7 +677,7 @@
     //! Linear O(N).
     void resize(size_type count, value_type const& value)
     {
- if ( count < m_members.size )
+ if ( count < m_size )
         {
             namespace sv = static_vector_detail;
             sv::destroy(this->begin() + count, this->end());
@@ -775,7 +688,7 @@
             
             std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
         }
- m_members.size = count; // update end
+ m_size = count; // update end
     }
 
     //! @pre <tt>count <= capacity()</tt>
@@ -813,11 +726,11 @@
     //! Constant O(1).
     void push_back(value_type const& value)
     {
- errh::check_capacity(*this, m_members.size + 1); // may throw
+ errh::check_capacity(*this, m_size + 1); // may throw
         
         namespace sv = static_vector_detail;
         sv::construct(this->end(), value); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
     }
 
     //! @pre <tt>size() < capacity()</tt>
@@ -836,11 +749,11 @@
     //! Constant O(1).
     void push_back(BOOST_RV_REF(value_type) value)
     {
- errh::check_capacity(*this, m_members.size + 1); // may throw
+ errh::check_capacity(*this, m_size + 1); // may throw
 
         namespace sv = static_vector_detail;
         sv::construct(this->end(), value); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
     }
 
     //! @pre <tt>!empty()</tt>
@@ -858,7 +771,7 @@
 
         namespace sv = static_vector_detail;
         sv::destroy(this->end() - 1);
- --m_members.size; // update end
+ --m_size; // update end
     }
 
     //! @pre
@@ -928,12 +841,12 @@
     iterator insert(iterator position, size_type count, value_type const& value)
     {
         errh::check_iterator_end_eq(*this, position);
- errh::check_capacity(*this, m_members.size + count); // may throw
+ errh::check_capacity(*this, m_size + count); // may throw
 
         if ( position == this->end() )
         {
- std::uninitialized_fill(position, position + count, value); // may throw
- m_members.size += count; // update end
+ std::uninitialized_fill(position, position + count, value); // may throw
+ m_size += count; // update end
         }
         else
         {
@@ -946,16 +859,16 @@
             if ( count < static_cast<size_type>(to_move) )
             {
                 sv::uninitialized_move(this->end() - count, this->end(), this->end()); // may throw
- m_members.size += count; // update end
+ m_size += count; // update end
                 sv::move_backward(position, position + to_move - count, this->end() - count); // may throw
                 std::fill_n(position, count, value); // may throw
             }
             else
             {
                 std::uninitialized_fill(this->end(), position + count, value); // may throw
- m_members.size += count - to_move; // update end
+ m_size += count - to_move; // update end
                 sv::uninitialized_move(position, position + to_move, position + count); // may throw
- m_members.size += to_move; // update end
+ m_size += to_move; // update end
                 std::fill_n(position, to_move, value); // may throw
             }
         }
@@ -1016,7 +929,7 @@
 
         sv::move(position + 1, this->end(), position); // may throw
         sv::destroy(this->end() - 1);
- --m_members.size;
+ --m_size;
 
         return position;
     }
@@ -1051,7 +964,7 @@
 
         sv::move(last, this->end(), first); // may throw
         sv::destroy(this->end() - n, this->end());
- m_members.size -= n;
+ m_size -= n;
 
         return first;
     }
@@ -1091,7 +1004,7 @@
     //! Linear O(N).
     void assign(size_type count, value_type const& value)
     {
- if ( count < m_members.size )
+ if ( count < m_size )
         {
             namespace sv = static_vector_detail;
 
@@ -1102,10 +1015,10 @@
         {
             errh::check_capacity(*this, count); // may throw
 
- std::fill_n(this->begin(), m_members.size, value);
+ std::fill_n(this->begin(), m_size, value);
             std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
         }
- m_members.size = count; // update end
+ m_size = count; // update end
     }
 
 #if !defined(BOOST_CONTAINER_STATIC_VECTOR_DISABLE_EMPLACE)
@@ -1128,11 +1041,11 @@
     template<class ...Args>
     void emplace_back(Args &&...args)
     {
- errh::check_capacity(*this, m_members.size + 1); // may throw
+ errh::check_capacity(*this, m_size + 1); // may throw
 
         namespace sv = static_vector_detail;
         sv::construct(this->end(), ::boost::forward<Args>(args)...); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
     }
 
     //! @pre
@@ -1159,12 +1072,12 @@
         namespace sv = static_vector_detail;
 
         errh::check_iterator_end_eq(*this, position);
- errh::check_capacity(*this, m_members.size + 1); // may throw
+ errh::check_capacity(*this, m_size + 1); // may throw
 
         if ( position == this->end() )
         {
             sv::construct(position, ::boost::forward<Args>(args)...); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
         }
         else
         {
@@ -1173,7 +1086,7 @@
             // TODO - should move be used only if it's nonthrowing?
             value_type & r = *(this->end() - 1);
             sv::construct(this->end(), boost::move(r)); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
             sv::move_backward(position, this->end() - 2, this->end() - 1); // may throw
 
             aligned_storage<sizeof(value_type), alignment_of<value_type>::value> temp_storage;
@@ -1192,11 +1105,11 @@
     BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
     void emplace_back(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
     { \
- errh::check_capacity(*this, m_members.size + 1); /*may throw*/\
+ errh::check_capacity(*this, m_size + 1); /*may throw*/\
                                                                                                  \
         namespace sv = static_vector_detail; \
         sv::construct(this->end() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); /*may throw*/\
- ++m_members.size; /*update end*/ \
+ ++m_size; /*update end*/ \
     } \
     //
     #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
@@ -1209,12 +1122,12 @@
         namespace sv = static_vector_detail; \
                                                                                                     \
         errh::check_iterator_end_eq(*this, position); \
- errh::check_capacity(*this, m_members.size + 1); /*may throw*/\
+ errh::check_capacity(*this, m_size + 1); /*may throw*/\
                                                                                                     \
         if ( position == this->end() ) \
         { \
             sv::construct(position BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); /*may throw*/\
- ++m_members.size; /*update end*/ \
+ ++m_size; /*update end*/ \
         } \
         else \
         { \
@@ -1223,7 +1136,7 @@
                                                                                                     \
             value_type & r = *(this->end() - 1); \
             sv::construct(this->end(), boost::move(r)); /*may throw*/\
- ++m_members.size; /*update end*/ \
+ ++m_size; /*update end*/ \
             sv::move_backward(position, this->end() - 2, this->end() - 1); /*may throw*/\
                                                                                                     \
             aligned_storage<sizeof(value_type), alignment_of<value_type>::value> temp_storage; \
@@ -1253,7 +1166,7 @@
     {
         namespace sv = static_vector_detail;
         sv::destroy(this->begin(), this->end());
- m_members.size = 0; // update end
+ m_size = 0; // update end
     }
 
     //! @pre <tt>i < size()</tt>
@@ -1478,7 +1391,7 @@
     //!
     //! @par Complexity
     //! Constant O(1).
- iterator end() { return this->begin() + m_members.size; }
+ iterator end() { return this->begin() + m_size; }
 
     //! @brief Returns const iterator to the one after the last element.
     //!
@@ -1489,7 +1402,7 @@
     //!
     //! @par Complexity
     //! Constant O(1).
- const_iterator end() const { return this->begin() + m_members.size; }
+ const_iterator end() const { return this->begin() + m_size; }
 
     //! @brief Returns const iterator to the one after the last element.
     //!
@@ -1500,7 +1413,7 @@
     //!
     //! @par Complexity
     //! Constant O(1).
- const_iterator cend() const { return this->cbegin() + m_members.size; }
+ const_iterator cend() const { return this->cbegin() + m_size; }
 
     //! @brief Returns reverse iterator to the first element of the reversed container.
     //!
@@ -1605,7 +1518,7 @@
     //!
     //! @par Complexity
     //! Constant O(1).
- size_type size() const { return m_members.size; }
+ size_type size() const { return m_size; }
 
     //! @brief Queries if the container contains elements.
     //!
@@ -1617,7 +1530,7 @@
     //!
     //! @par Complexity
     //! Constant O(1).
- bool empty() const { return 0 == m_members.size; }
+ bool empty() const { return 0 == m_size; }
 
     //! @brief Capacity is fixed so this call has no effects.
     //!
@@ -1628,8 +1541,6 @@
     //! Constant O(1).
     void shrink_to_fit() {}
 
- strategy_type get_strategy() const { return m_members.strategy; }
-
 private:
 
     // @par Throws
@@ -1639,9 +1550,9 @@
     template <std::size_t C, typename S>
     void move_ctor_dispatch(static_vector<value_type, C, S> & other, boost::true_type /*use_memop*/)
     {
- ::memcpy(this->data(), other.data(), sizeof(Value) * other.m_members.size);
- m_members.size = other.m_members.size;
- other.m_members.size = 0;
+ ::memcpy(this->data(), other.data(), sizeof(Value) * other.m_size);
+ m_size = other.m_size;
+ other.m_size = 0;
     }
 
     // @par Throws
@@ -1654,9 +1565,9 @@
     {
         namespace sv = static_vector_detail;
         sv::uninitialized_move_if_noexcept(other.begin(), other.end(), this->begin()); // may throw
- m_members.size = other.m_members.size;
+ m_size = other.m_size;
         sv::destroy(other.begin(), other.end());
- other.m_members.size = 0;
+ other.m_size = 0;
     }
 
     // @par Throws
@@ -1668,8 +1579,8 @@
     {
         this->clear();
 
- ::memcpy(this->data(), other.data(), sizeof(Value) * other.m_members.size);
- boost::swap(m_members.size, other.m_members.size);
+ ::memcpy(this->data(), other.data(), sizeof(Value) * other.m_size);
+ boost::swap(m_size, other.m_size);
     }
 
     // @par Throws
@@ -1681,18 +1592,18 @@
     void move_assign_dispatch(static_vector<value_type, C, S> & other, boost::false_type /*use_memop*/)
     {
         namespace sv = static_vector_detail;
- if ( m_members.size <= static_cast<size_type>(other.size()) )
+ if ( m_size <= static_cast<size_type>(other.size()) )
         {
- sv::move_if_noexcept(other.begin(), other.begin() + m_members.size, this->begin()); // may throw
+ sv::move_if_noexcept(other.begin(), other.begin() + m_size, this->begin()); // may throw
             // TODO - perform uninitialized_copy first?
- sv::uninitialized_move_if_noexcept(other.begin() + m_members.size, other.end(), this->end()); // may throw
+ sv::uninitialized_move_if_noexcept(other.begin() + m_size, other.end(), this->end()); // may throw
         }
         else
         {
             sv::move_if_noexcept(other.begin(), other.end(), this->begin()); // may throw
             sv::destroy(this->begin() + other.size(), this->end());
         }
- m_members.size = other.size(); // update end
+ m_size = other.size(); // update end
 
         other.clear();
     }
@@ -1706,12 +1617,9 @@
     {
         typedef typename
         boost::mpl::if_c<
- (Capacity < C),
- typename members_type::aligned_storage_type,
- typename static_vector_detail::members<
- value_type, C, S,
- ::boost::is_stateless<S>::value
- >::aligned_storage_type
+ Capacity < C,
+ aligned_storage_type,
+ typename static_vector<value_type, C, S>::aligned_storage_type
>::type
         storage_type;
         
@@ -1722,7 +1630,7 @@
         ::memcpy(this->data(), other.data(), sizeof(Value) * other.size());
         ::memcpy(other.data(), temp_ptr, sizeof(Value) * this->size());
 
- boost::swap(m_members.size, other.m_members.size);
+ boost::swap(m_size, other.m_size);
     }
 
     // @par Throws
@@ -1744,7 +1652,7 @@
             swap_dispatch_impl(this->begin(), this->end(), other.begin(), other.end(), use_memop_in_swap_and_move()); // may throw
         else
             swap_dispatch_impl(other.begin(), other.end(), this->begin(), this->end(), use_memop_in_swap_and_move()); // may throw
- boost::swap(m_members.size, other.m_members.size);
+ boost::swap(m_size, other.m_size);
     }
 
     // @par Throws
@@ -1805,12 +1713,12 @@
         namespace sv = static_vector_detail;
 
         errh::check_iterator_end_eq(*this, position);
- errh::check_capacity(*this, m_members.size + 1); // may throw
+ errh::check_capacity(*this, m_size + 1); // may throw
 
         if ( position == this->end() )
         {
             sv::construct(position, value); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
         }
         else
         {
@@ -1819,7 +1727,7 @@
             // TODO - should move be used only if it's nonthrowing?
             value_type & r = *(this->end() - 1);
             sv::construct(this->end(), boost::move(r)); // may throw
- ++m_members.size; // update end
+ ++m_size; // update end
             sv::move_backward(position, this->end() - 2, this->end() - 1); // may throw
             sv::assign(position, value); // may throw
         }
@@ -1844,14 +1752,14 @@
         typename boost::iterator_difference<Iterator>::type
             count = std::distance(first, last);
 
- errh::check_capacity(*this, m_members.size + count); // may throw
+ errh::check_capacity(*this, m_size + count); // may throw
 
         if ( position == this->end() )
         {
             namespace sv = static_vector_detail;
 
             sv::uninitialized_copy(first, last, position); // may throw
- m_members.size += count; // update end
+ m_size += count; // update end
         }
         else
         {
@@ -1876,16 +1784,16 @@
             std::ptrdiff_t d = std::distance(position, this->begin() + Capacity);
             std::size_t count = sv::uninitialized_copy_s(first, last, position, d); // may throw
             
- errh::check_capacity(*this, count <= static_cast<std::size_t>(d) ? m_members.size + count : Capacity + 1); // may throw
+ errh::check_capacity(*this, count <= static_cast<std::size_t>(d) ? m_size + count : Capacity + 1); // may throw
 
- m_members.size += count;
+ m_size += count;
         }
         else
         {
             typename boost::iterator_difference<Iterator>::type
                 count = std::distance(first, last);
             
- errh::check_capacity(*this, m_members.size + count); // may throw
+ errh::check_capacity(*this, m_size + count); // may throw
 
             this->insert_in_the_middle(position, first, last, count); // may throw
         }
@@ -1908,7 +1816,7 @@
         if ( count < to_move )
         {
             sv::uninitialized_move(this->end() - count, this->end(), this->end()); // may throw
- m_members.size += count; // update end
+ m_size += count; // update end
             sv::move_backward(position, position + to_move - count, this->end() - count); // may throw
             sv::copy(first, last, position); // may throw
         }
@@ -1918,9 +1826,9 @@
             std::advance(middle_iter, to_move);
 
             sv::uninitialized_copy(middle_iter, last, this->end()); // may throw
- m_members.size += count - to_move; // update end
+ m_size += count - to_move; // update end
             sv::uninitialized_move(position, position + to_move, position + count); // may throw
- m_members.size += to_move; // update end
+ m_size += to_move; // update end
             sv::copy(first, middle_iter, position); // may throw
         }
     }
@@ -1941,18 +1849,18 @@
 
         errh::check_capacity(*this, s); // may throw
 
- if ( m_members.size <= static_cast<size_type>(s) )
+ if ( m_size <= static_cast<size_type>(s) )
         {
- sv::copy(first, first + m_members.size, this->begin()); // may throw
+ sv::copy(first, first + m_size, this->begin()); // may throw
             // TODO - perform uninitialized_copy first?
- sv::uninitialized_copy(first + m_members.size, last, this->end()); // may throw
+ sv::uninitialized_copy(first + m_size, last, this->end()); // may throw
         }
         else
         {
             sv::copy(first, last, this->begin()); // may throw
             sv::destroy(this->begin() + s, this->end());
         }
- m_members.size = s; // update end
+ m_size = s; // update end
     }
 
     // @par Throws
@@ -1978,20 +1886,21 @@
 
         errh::check_capacity(*this, count <= static_cast<std::size_t>(d) ? s : Capacity + 1); // may throw
 
- m_members.size = s; // update end
+ m_size = s; // update end
     }
 
     pointer ptr()
     {
- return pointer(static_cast<Value*>(m_members.storage.address()));
+ return pointer(static_cast<Value*>(m_storage.address()));
     }
 
     const_pointer ptr() const
     {
- return const_pointer(static_cast<const Value*>(m_members.storage.address()));
+ return const_pointer(static_cast<const Value*>(m_storage.address()));
     }
 
- members_type m_members;
+ size_type m_size;
+ aligned_storage_type m_storage;
 };
 
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

Modified: sandbox/static_vector/doc/generated/static_vector.qbk
==============================================================================
--- sandbox/static_vector/doc/generated/static_vector.qbk (original)
+++ sandbox/static_vector/doc/generated/static_vector.qbk 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -15,7 +15,7 @@
 Insertion beyond the capacity and out of bounds errors result in undefined behavior unless otherwise specified. In this respect if [link classboost_1_1container_1_1static__vector_1af2a0e0148e73a8b6799ac7af3a26d6a3 size()] == [link classboost_1_1container_1_1static__vector_1aabaf12d350a1b5457ba8ae4176819844 capacity()], then [link classboost_1_1container_1_1static__vector_1ae61c0bcedf9162c63c8b738ddfaed93d static_vector::push_back()] behaves like std::vector pop_front() if [link classboost_1_1container_1_1static__vector_1af2a0e0148e73a8b6799ac7af3a26d6a3 size()] == [link classboost_1_1container_1_1static__vector_1aa408660722a22b80104613e28c514fc8 empty()]. The reason for this difference is because unlike vectors, [link classboost_1_1container_1_1static__vector static_vector] does not perform allocation.
 
 [heading Advanced Usage]
-Error handling behavior can be modified to more closely match std::vector exception behavior when exceeding bounds by providing an alternate Strategy and/or static_vector_traits specialization.
+Error handling behavior can be modified to more closely match std::vector exception behavior when exceeding bounds by providing an alternate Strategy and static_vector_traits instantiation.
 
 [heading Header]
 `#include <boost/container/static_vector.hpp>`
@@ -60,7 +60,6 @@
 [table
 [[Function][Description]]
 [[[link classboost_1_1container_1_1static__vector_1ae0f7f391d06180aea516a6b03b3402c2 `static_vector()`]][Constructs an empty [link classboost_1_1container_1_1static__vector static_vector]. ]]
-[[[link classboost_1_1container_1_1static__vector_1acbccc8d166f7c72aba8741aabf50b628 `static_vector(strategy_type const &)`]][Constructs an empty [link classboost_1_1container_1_1static__vector static_vector]. ]]
 [[[link classboost_1_1container_1_1static__vector_1ab6461f56b1a46dc3e708e22d24b262c5 `static_vector(size_type)`]][Constructs a [link classboost_1_1container_1_1static__vector static_vector] containing count default constructed Values. ]]
 [[[link classboost_1_1container_1_1static__vector_1a5f0a8f8d5a685d0d9ed9c54e202c7c3c `static_vector(size_type, value_type const &)`]][Constructs a [link classboost_1_1container_1_1static__vector static_vector] containing count copies of value. ]]
 [[[link classboost_1_1container_1_1static__vector_1a5e2c5c81fe53874667e3b9c2c07757b3 `static_vector(Iterator, Iterator)`]][Constructs a [link classboost_1_1container_1_1static__vector static_vector] containing copy of a range [^`[first, last)`]. ]]
@@ -124,7 +123,6 @@
 [[[link classboost_1_1container_1_1static__vector_1af2a0e0148e73a8b6799ac7af3a26d6a3 `size()`]][Returns the number of stored elements. ]]
 [[[link classboost_1_1container_1_1static__vector_1aa408660722a22b80104613e28c514fc8 `empty()`]][Queries if the container contains elements. ]]
 [[[link classboost_1_1container_1_1static__vector_1a4d89dc588ace1ce15c307a923a89f1b5 `shrink_to_fit()`]][Capacity is fixed so this call has no effects. ]]
-[[[link classboost_1_1container_1_1static__vector_1ad21b9fcbebc27b04a318b217803c7028 `get_strategy()`]][]]
 ]
 
 [#classboost_1_1container_1_1static__vector_1ae0f7f391d06180aea516a6b03b3402c2]
@@ -145,29 +143,6 @@
 
 [endsect]
 
-[#classboost_1_1container_1_1static__vector_1acbccc8d166f7c72aba8741aabf50b628]
-[section static_vector(strategy_type const &)]
-Constructs an empty [link classboost_1_1container_1_1static__vector static_vector].
-
-[heading Synopsis]
-[pre
-
-`static_vector``(`[^[link classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0 strategy_type]]` const &` `s``)`
-]
-
-[heading Parameter(s)]
-[table
-[[Type][Name][Description]]
-[[[^[link classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0 strategy_type]]` const &`][ `s` ][]]
-]
-[heading Throws]
-Nothing.
-
-[heading Complexity]
-Constant O(1).
-
-[endsect]
-
 [#classboost_1_1container_1_1static__vector_1ab6461f56b1a46dc3e708e22d24b262c5]
 [section static_vector(size_type)]
 Constructs a [link classboost_1_1container_1_1static__vector static_vector] containing count default constructed Values.
@@ -1614,17 +1589,5 @@
 
 [endsect]
 
-[#classboost_1_1container_1_1static__vector_1ad21b9fcbebc27b04a318b217803c7028]
-[section get_strategy()]
-
-
-[heading Synopsis]
-[pre
-
-[^[link classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0 strategy_type]] `get_strategy``()`
-]
-
-[endsect]
-
 [endsect]
 

Modified: sandbox/static_vector/doc/generated/strategy_allocator_adaptor.qbk
==============================================================================
--- sandbox/static_vector/doc/generated/strategy_allocator_adaptor.qbk (original)
+++ sandbox/static_vector/doc/generated/strategy_allocator_adaptor.qbk 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -4,7 +4,10 @@
 [section:boost_container_strategy_allocator_adaptor boost::container::strategy::allocator_adaptor]
 
 '''<indexterm><primary>boost</primary></indexterm><indexterm><primary>container</primary></indexterm><indexterm><primary>strategy</primary></indexterm><indexterm><primary>allocator_adaptor</primary></indexterm>'''
-Strategy adapted from allocator used to create a container object.
+The strategy adapting info from passed Allocator.
+
+[heading Description]
+This strategy defines the same types that are defined in the Allocator.
 
 [heading Header]
 `#include <boost/container/static_vector.hpp>`
@@ -21,44 +24,8 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Description]]
-[[`Allocator`][The type of allocator used to construct a container object. ]]
-]
-
-[heading Constructor(s) and destructor]
-[table
-[[Function][Description]]
-[[[link structboost_1_1container_1_1strategy_1_1allocator__adaptor_1a87cc156b8246ab93d0a72e69f5a8a160 `allocator_adaptor()`]][The default constructor. ]]
-[[[link structboost_1_1container_1_1strategy_1_1allocator__adaptor_1abbb1a1cd5b713887d2e98fa74be9eb40 `allocator_adaptor(Allocator const &)`]][The default constructor. ]]
+[[`Allocator`][The Allocator which will be adapted. ]]
 ]
 
-[#structboost_1_1container_1_1strategy_1_1allocator__adaptor_1a87cc156b8246ab93d0a72e69f5a8a160]
-[section allocator_adaptor()]
-The default constructor.
-
-[heading Synopsis]
-[pre
-
-`allocator_adaptor``()`
-]
-
-[endsect]
-
-[#structboost_1_1container_1_1strategy_1_1allocator__adaptor_1abbb1a1cd5b713887d2e98fa74be9eb40]
-[section allocator_adaptor(Allocator const &)]
-The default constructor.
-
-[heading Synopsis]
-[pre
-
-`allocator_adaptor``(``Allocator const &` `alloc``)`
-]
-
-[heading Parameter(s)]
-[table
-[[Type][Name][Description]]
-[[`Allocator const &`][ `alloc` ][The allocator object used to construct a container object. ]]
-]
-[endsect]
-
 [endsect]
 

Modified: sandbox/static_vector/doc/generated/strategy_def.qbk
==============================================================================
--- sandbox/static_vector/doc/generated/strategy_def.qbk (original)
+++ sandbox/static_vector/doc/generated/strategy_def.qbk 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -4,7 +4,7 @@
 [section:boost_container_strategy_def boost::container::strategy::def]
 
 '''<indexterm><primary>boost</primary></indexterm><indexterm><primary>container</primary></indexterm><indexterm><primary>strategy</primary></indexterm><indexterm><primary>def</primary></indexterm>'''
-Default strategy.
+The default strategy.
 
 [heading Header]
 `#include <boost/container/static_vector.hpp>`
@@ -21,7 +21,7 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Description]]
-[[`Value`][Type of value stored in the container. ]]
+[[`Value`][Type of element stored in the container. ]]
 ]
 
 [endsect]

Modified: sandbox/static_vector/doc/html/index.html
==============================================================================
--- sandbox/static_vector/doc/html/index.html (original)
+++ sandbox/static_vector/doc/html/index.html 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -52,7 +52,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 15, 2013 at 21:47:31 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 15, 2013 at 23:32:05 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/static_vector/doc/html/static_vector/reference.html
==============================================================================
--- sandbox/static_vector/doc/html/static_vector/reference.html (original)
+++ sandbox/static_vector/doc/html/static_vector/reference.html 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -36,7 +36,7 @@
 <a name="staticvector.reference.boost_container_static_vector"></a><a name="classboost_1_1container_1_1static__vector"></a><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector" title="boost::container::static_vector">boost::container::static_vector</a>
 </h3></div></div></div>
 <p>
- <a class="indexterm" name="id866804"></a><a class="indexterm" name="id866809"></a><a class="indexterm" name="id866814"></a>
+ <a class="indexterm" name="id894111"></a><a class="indexterm" name="id894116"></a><a class="indexterm" name="id894120"></a>
 A hybrid of <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">container</span><span class="special">::</span><span class="identifier">vector</span></code></code>
         and <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></code> with fixed capacity.
       </p>
@@ -87,7 +87,7 @@
 <p>
         Error handling behavior can be modified to more closely match std::vector
         exception behavior when exceeding bounds by providing an alternate Strategy
- and/or static_vector_traits specialization.
+ and static_vector_traits instantiation.
       </p>
 <h5>
 <a name="staticvector.reference.boost_container_static_vector.h3"></a>
@@ -377,19 +377,6 @@
 <tr>
 <td>
                 <p>
- <a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1acbccc8d166f7c72aba8741aabf50b628"><code class="computeroutput"><span class="identifier">static_vector</span><span class="special">(</span><span class="identifier">strategy_type</span> <span class="keyword">const</span>
- <span class="special">&amp;)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- Constructs an empty <a class="link" href="reference.html#classboost_1_1container_1_1static__vector">static_vector</a>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
                   <a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1ab6461f56b1a46dc3e708e22d24b262c5"><code class="computeroutput"><span class="identifier">static_vector</span><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span></code></a>
                 </p>
               </td>
@@ -1165,15 +1152,6 @@
                 </p>
               </td>
 </tr>
-<tr>
-<td>
- <p>
- <a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1ad21b9fcbebc27b04a318b217803c7028"><code class="computeroutput"><span class="identifier">get_strategy</span><span class="special">()</span></code></a>
- </p>
- </td>
-<td>
- </td>
-</tr>
 </tbody>
 </table></div>
 <div class="section">
@@ -1206,78 +1184,6 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___"></a><a name="classboost_1_1container_1_1static__vector_1acbccc8d166f7c72aba8741aabf50b628"></a><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___" title="static_vector(strategy_type const &amp;)">static_vector(strategy_type
- const &amp;)</a>
-</h4></div></div></div>
-<p>
- Constructs an empty <a class="link" href="reference.html#classboost_1_1container_1_1static__vector">static_vector</a>.
- </p>
-<h6>
-<a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.h0"></a>
- <span class="phrase"><a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.synopsis"></a></span><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.synopsis">Synopsis</a>
- </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="identifier">static_vector</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0">strategy_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">s</span></code><code class="computeroutput"><span class="special">)</span></code>
-</pre>
-<h6>
-<a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.h1"></a>
- <span class="phrase"><a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.parameter_s_">Parameter(s)</a>
- </h6>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Type
- </p>
- </th>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0">strategy_type</a></code><code class="computeroutput">
- <span class="keyword">const</span> <span class="special">&amp;</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-<td>
- </td>
-</tr></tbody>
-</table></div>
-<h6>
-<a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.h2"></a>
- <span class="phrase"><a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.throws"></a></span><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.throws">Throws</a>
- </h6>
-<p>
- Nothing.
- </p>
-<h6>
-<a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.h3"></a>
- <span class="phrase"><a name="staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.complexity"></a></span><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_strategy_type_const___.complexity">Complexity</a>
- </h6>
-<p>
- Constant O(1).
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
 <a name="staticvector.reference.boost_container_static_vector.static_vector_size_type_"></a><a name="classboost_1_1container_1_1static__vector_1ab6461f56b1a46dc3e708e22d24b262c5"></a><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.static_vector_size_type_" title="static_vector(size_type)">static_vector(size_type)</a>
 </h4></div></div></div>
 <p>
@@ -5212,17 +5118,6 @@
           Constant O(1).
         </p>
 </div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="staticvector.reference.boost_container_static_vector.get_strategy__"></a><a name="classboost_1_1container_1_1static__vector_1ad21b9fcbebc27b04a318b217803c7028"></a><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.get_strategy__" title="get_strategy()">get_strategy()</a>
-</h4></div></div></div>
-<h6>
-<a name="staticvector.reference.boost_container_static_vector.get_strategy__.h0"></a>
- <span class="phrase"><a name="staticvector.reference.boost_container_static_vector.get_strategy__.synopsis"></a></span><a class="link" href="reference.html#staticvector.reference.boost_container_static_vector.get_strategy__.synopsis">Synopsis</a>
- </h6>
-<pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1container_1_1static__vector_1a041d1b8def12d8781f34f32a12fd53d0">strategy_type</a></code> <code class="computeroutput"><span class="identifier">get_strategy</span></code><code class="computeroutput"><span class="special">()</span></code>
-</pre>
-</div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
@@ -6080,8 +5975,8 @@
 <a name="staticvector.reference.reference.boost_container_strategy_def"></a><a name="structboost_1_1container_1_1strategy_1_1def"></a><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_def" title="boost::container::strategy::def">boost::container::strategy::def</a>
 </h4></div></div></div>
 <p>
- <a class="indexterm" name="id912447"></a><a class="indexterm" name="id912452"></a><a class="indexterm" name="id912457"></a><a class="indexterm" name="id912461"></a>
-Default strategy.
+ <a class="indexterm" name="id939407"></a><a class="indexterm" name="id939412"></a><a class="indexterm" name="id939416"></a><a class="indexterm" name="id939421"></a>
+The default strategy.
         </p>
 <h6>
 <a name="staticvector.reference.reference.boost_container_strategy_def.h0"></a>
@@ -6130,7 +6025,7 @@
                 </td>
 <td>
                   <p>
- Type of value stored in the container.
+ Type of element stored in the container.
                   </p>
                 </td>
 </tr></tbody>
@@ -6141,18 +6036,25 @@
 <a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor"></a><a name="structboost_1_1container_1_1strategy_1_1allocator__adaptor"></a><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor" title="boost::container::strategy::allocator_adaptor">boost::container::strategy::allocator_adaptor</a>
 </h4></div></div></div>
 <p>
- <a class="indexterm" name="id912697"></a><a class="indexterm" name="id912701"></a><a class="indexterm" name="id912706"></a><a class="indexterm" name="id912711"></a>
-Strategy adapted from allocator used to create a container object.
+ <a class="indexterm" name="id939656"></a><a class="indexterm" name="id939661"></a><a class="indexterm" name="id939666"></a><a class="indexterm" name="id939671"></a>
+The strategy adapting info from passed Allocator.
         </p>
 <h6>
 <a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h0"></a>
+ <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.description"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.description">Description</a>
+ </h6>
+<p>
+ This strategy defines the same types that are defined in the Allocator.
+ </p>
+<h6>
+<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h1"></a>
           <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.header"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.header">Header</a>
         </h6>
 <p>
           <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">static_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
         </p>
 <h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h1"></a>
+<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h2"></a>
           <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.synopsis"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
@@ -6162,7 +6064,7 @@
 <code class="computeroutput"><span class="special">};</span></code>
 </pre>
 <h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h2"></a>
+<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h3"></a>
           <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.template_parameter_s_"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.template_parameter_s_">Template
           parameter(s)</a>
         </h6>
@@ -6191,138 +6093,14 @@
                 </td>
 <td>
                   <p>
- The type of allocator used to construct a container object.
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.h3"></a>
- <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.constructor_s__and_destructor">Constructor(s)
- and destructor</a>
- </h6>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Function
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- <a class="link" href="reference.html#structboost_1_1container_1_1strategy_1_1allocator__adaptor_1a87cc156b8246ab93d0a72e69f5a8a160"><code class="computeroutput"><span class="identifier">allocator_adaptor</span><span class="special">()</span></code></a>
- </p>
- </td>
-<td>
- <p>
- The default constructor.
+ The Allocator which will be adapted.
                   </p>
                 </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="reference.html#structboost_1_1container_1_1strategy_1_1allocator__adaptor_1abbb1a1cd5b713887d2e98fa74be9eb40"><code class="computeroutput"><span class="identifier">allocator_adaptor</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="keyword">const</span>
- <span class="special">&amp;)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- The default constructor.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<div class="section">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor__"></a><a name="structboost_1_1container_1_1strategy_1_1allocator__adaptor_1a87cc156b8246ab93d0a72e69f5a8a160"></a><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor__" title="allocator_adaptor()">allocator_adaptor()</a>
-</h5></div></div></div>
-<p>
- The default constructor.
- </p>
-<h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor__.h0"></a>
- <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor__.synopsis"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor__.synopsis">Synopsis</a>
- </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="identifier">allocator_adaptor</span></code><code class="computeroutput"><span class="special">()</span></code>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___"></a><a name="structboost_1_1container_1_1strategy_1_1allocator__adaptor_1abbb1a1cd5b713887d2e98fa74be9eb40"></a><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___" title="allocator_adaptor(Allocator const &amp;)">allocator_adaptor(Allocator
- const &amp;)</a>
-</h5></div></div></div>
-<p>
- The default constructor.
- </p>
-<h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.h0"></a>
- <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.synopsis"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.synopsis">Synopsis</a>
- </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="identifier">allocator_adaptor</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Allocator</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">alloc</span></code><code class="computeroutput"><span class="special">)</span></code>
-</pre>
-<h6>
-<a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.h1"></a>
- <span class="phrase"><a name="staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.parameter_s_"></a></span><a class="link" href="reference.html#staticvector.reference.reference.boost_container_strategy_allocator_adaptor.allocator_adaptor_allocator_const___.parameter_s_">Parameter(s)</a>
- </h6>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Type
- </p>
- </th>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Allocator</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">alloc</span></code>
- </p>
- </td>
-<td>
- <p>
- The allocator object used to construct a container object.
- </p>
- </td>
 </tr></tbody>
 </table></div>
 </div>
 </div>
 </div>
-</div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><div class="copyright-footer">Copyright &#169; 2012 Adam Wulkiewicz<br>Copyright &#169; 2011, 2012 Andrew Hundt<p>

Modified: sandbox/static_vector/test/static_vector_interprocess_test.cpp
==============================================================================
--- sandbox/static_vector/test/static_vector_interprocess_test.cpp (original)
+++ sandbox/static_vector/test/static_vector_interprocess_test.cpp 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -24,16 +24,10 @@
 
 template <typename V, typename SegmentManager>
 struct interprocess_strategy
- : public boost::container::strategy::allocator_adaptor<
+ : public strategy::allocator_adaptor<
         boost::interprocess::allocator<V, SegmentManager>
>
-{
- typedef boost::container::strategy::allocator_adaptor<
- boost::interprocess::allocator<V, SegmentManager>
- > base_t;
-
- explicit interprocess_strategy(SegmentManager * sm) : base_t(sm) {}
-};
+{};
 
 template <typename T, size_t N>
 void test_interprocess(T const& t)
@@ -47,10 +41,12 @@
 
     bi::managed_shared_memory shmem(bi::create_only, "shared_memory", 10000 + sizeof(T) * N);
 
- typedef interprocess_strategy<T, bi::managed_shared_memory::segment_manager> S;
- typedef static_vector<T, N, S> SV;
+ typedef static_vector<
+ T, N,
+ interprocess_strategy<T, bi::managed_shared_memory::segment_manager>
+ > SV;
 
- SV * sv_ptr = shmem.construct<SV>("my_object")(S(shmem.get_segment_manager()));
+ SV * sv_ptr = shmem.construct<SV>("my_object")();
 
     for ( size_t i = 0 ; i < N ; ++i )
         sv_ptr->push_back(T(N - i));
@@ -70,9 +66,6 @@
     for ( size_t i = 0 ; i < N/2 ; ++i )
         BOOST_CHECK(sv_ptr->at(i) == t);
 
- static_vector<int, 10> svvv;
- std::cout << sizeof(svvv) << std::endl;
-
     shmem.destroy_ptr(sv_ptr);
 }
 

Modified: sandbox/static_vector/test/static_vector_test.cpp
==============================================================================
--- sandbox/static_vector/test/static_vector_test.cpp (original)
+++ sandbox/static_vector/test/static_vector_test.cpp 2013-01-15 18:35:08 EST (Tue, 15 Jan 2013)
@@ -35,7 +35,7 @@
 #include "static_vector_test.hpp"
 
 template <typename V>
-struct bad_alloc_strategy /*bad_alloc_fake_allocator*/
+struct bad_alloc_strategy
     : public strategy::def<V>
 {
     static void allocate_failed()


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