
11 Oct
2004
11 Oct
'04
7:44 p.m.
Greetings Anders, On Oct 11, 2004, at 12:18 PM, Anders Edin wrote:
It appears multi_array uses a boost::array internally to store this information, and uses the data() method to return a pointer in the above methods. Wouldn't it be better to return a reference to the array directly:
The multi_array class template matches the requirements of the MultiArray concept, which specifies that the member functions that you mention return pointers. Other types in the Boost.MultiArray library, such as views and subarrays also implement MultiArray, but subarrays for example do not store the same information in boost::arrays. Thus the various types share a common interface so that they can be used generically. Hope this helps, ron