
15 Mar
2009
15 Mar
'09
12:24 p.m.
Niels Dekker wrote:
herve martin wrote:
I would submit a simple change request in the boost::array library.
...
I suggest to change: T* c_array() { return elems; }
into T (&c_array())[N] { return *(T(*)[N]) elems; }
Believe it or not, I was considering to submit the very same feature request. But go ahead: https://svn.boost.org/trac/boost/newticket (Please consider requesting a const overload as well!)
maybe I'm wrong but I don't think that we need the const overload since a T(&)[N] is implicitly convertible into a const T(&)[N] so { const int (&toto)[10] = (new boost::array<int,10>)->c_array() } should work. best regards, herve