| 55 | , std::size_t Version> |
| 56 | #endif |
| 57 | class node_allocator |
| 58 | { |
| 59 | #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
| 60 | //! If Version is 1, the allocator is a STL conforming allocator. If Version is 2, |
| 61 | //! the allocator offers advanced expand in place and burst allocation capabilities. |
| 62 | public: |
| 63 | typedef unsigned int allocation_type; |
| 64 | typedef node_allocator<T, NodesPerBlock, Version> self_t; |
| 65 | |
| 66 | static const std::size_t nodes_per_block = NodesPerBlock; |
| 67 | |
| 68 | BOOST_STATIC_ASSERT((Version <=2)); |
| 69 | #endif |
| 70 | |
| 71 | public: |
| 72 | //------- |
| 73 | typedef T value_type; |
| 74 | typedef T * pointer; |
| 75 | typedef const T * const_pointer; |
| 76 | typedef typename ::boost::container:: |
| 77 | container_detail::unvoid_ref<T>::type reference; |
| 78 | typedef typename ::boost::container:: |
| 79 | container_detail::unvoid_ref<const T>::type const_reference; |
| 80 | typedef std::size_t size_type; |
| 81 | typedef std::ptrdiff_t difference_type; |
| 82 | |
| 83 | typedef boost::container::container_detail:: |
| 84 | version_type<self_t, Version> version; |
| 85 | |
| 86 | #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
| 87 | typedef boost::container::container_detail:: |
| 88 | basic_multiallocation_chain<void*> multiallocation_chain_void; |
| 89 | typedef boost::container::container_detail:: |
| 90 | transform_multiallocation_chain |
| 91 | <multiallocation_chain_void, T> multiallocation_chain; |
| 92 | #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
| 93 | |
| 94 | //!Obtains node_allocator from |
| 95 | //!node_allocator |
| 96 | template<class T2> |
| 97 | struct rebind |
| 98 | { |
| 99 | typedef node_allocator< T2, NodesPerBlock |
| 100 | #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
| 101 | , Version |
| 102 | #endif |
| 103 | > other; |
| 104 | }; |
| 105 | |
| 106 | #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
| 107 | private: |
| 108 | //!Not assignable from related node_allocator |
| 109 | template<class T2, std::size_t N2> |
| 110 | node_allocator& operator= |
| 111 | (const node_allocator<T2, N2>&); |
| 112 | |
| 113 | //!Not assignable from other node_allocator |
| 114 | node_allocator& operator=(const node_allocator&); |
nothing calls this directly
no test coverage detected