28 Jan
2005
28 Jan
'05
2:55 p.m.
Does anyone know what the preferred method of accessing the underlying C array of a boost::array is? In boost 1.32 there is a data() member which returns a const pointer, and a c_array() member which returns a pointer. Also, the elems member itself is public. But at http://www.josuttis.com/cppcode/array.html, the author states that data() can be used for both const and non-const pointers, and indeed it is so in the version he posts on his website http://www.josuttis.com/cppcode/array.hpp.html (which doesn't provide the c_array() member but overloads data() instead). -- Frank