| 109 | template<typename T, std::size_t NumDims, |
| 110 | typename Allocator> |
| 111 | class multi_array : |
| 112 | public multi_array_ref<T,NumDims> |
| 113 | { |
| 114 | typedef multi_array_ref<T,NumDims> super_type; |
| 115 | public: |
| 116 | typedef typename super_type::value_type value_type; |
| 117 | typedef typename super_type::reference reference; |
| 118 | typedef typename super_type::const_reference const_reference; |
| 119 | typedef typename super_type::iterator iterator; |
| 120 | typedef typename super_type::const_iterator const_iterator; |
| 121 | typedef typename super_type::reverse_iterator reverse_iterator; |
| 122 | typedef typename super_type::const_reverse_iterator const_reverse_iterator; |
| 123 | typedef typename super_type::element element; |
| 124 | typedef typename super_type::size_type size_type; |
| 125 | typedef typename super_type::difference_type difference_type; |
| 126 | typedef typename super_type::index index; |
| 127 | typedef typename super_type::extent_range extent_range; |
| 128 | |
| 129 | |
| 130 | template <std::size_t NDims> |
| 131 | struct const_array_view { |
| 132 | typedef boost::detail::multi_array::const_multi_array_view<T,NDims> type; |
| 133 | }; |
| 134 | |
| 135 | template <std::size_t NDims> |
| 136 | struct array_view { |
| 137 | typedef boost::detail::multi_array::multi_array_view<T,NDims> type; |
| 138 | }; |
| 139 | |
| 140 | explicit multi_array() : |
| 141 | super_type((T*)initial_base_,c_storage_order(), |
| 142 | /*index_bases=*/0, /*extents=*/0) { |
| 143 | allocate_space(); |
| 144 | } |
| 145 | |
| 146 | template <class ExtentList> |
| 147 | explicit multi_array( |
| 148 | ExtentList const& extents |
| 149 | #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING |
| 150 | , typename mpl::if_< |
| 151 | detail::multi_array::is_multi_array_impl<ExtentList>, |
| 152 | int&,int>::type* = 0 |
| 153 | #endif |
| 154 | ) : |
| 155 | super_type((T*)initial_base_,extents) { |
| 156 | boost::function_requires< |
| 157 | detail::multi_array::CollectionConcept<ExtentList> >(); |
| 158 | allocate_space(); |
| 159 | } |
| 160 | |
| 161 | |
| 162 | template <class ExtentList> |
| 163 | explicit multi_array(ExtentList const& extents, |
| 164 | const general_storage_order<NumDims>& so) : |
| 165 | super_type((T*)initial_base_,extents,so) { |
| 166 | boost::function_requires< |
| 167 | detail::multi_array::CollectionConcept<ExtentList> >(); |
| 168 | allocate_space(); |
nothing calls this directly
no test coverage detected