Boost C++ Libraries: Ticket #3224: shape() should return a RandomAccessCollection https://svn.boost.org/trac10/ticket/3224 <p> Has there ever been any thought to making multi_array::shape() return something that models the Collection concept (<a class="missing wiki">RandomAccessCollection</a> in particular I suppose) rather than a raw pointer? This would allow the return value from shape() to be passed directly to multi_array::reshape() or multi_array::resize(), for added convenience. It would also allow a debug assertion to be added to make sure you don't try to access beyond the end of the array returned by shape(). </p> <p> From looking at the multi_array code, it looks like it would be relatively easy to add a new function called maybe "size()" which would replace "shape()" (which could be kept but deprecated) where size() would return a const reference to the boost::array used internally to store the extent_list_. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3224 Trac 1.4.3