
Herve Martin wrote:
I suggest to change: T* c_array() { return elems; } into T (&c_array())[N] { return *(T(*)[N]) elems; }
David Abrahams wrote:
Looks good in principle. What is the status of that function in TR1 and the latest draft standard? If it is different from your proposal, we should probably think about the consequences.
Hi Herve, David and I just mailed about the issue and we agreed that it would be preferable to have such a function as a non-member. Because tr1::array doesn't have such a c_array() member function and std::array probably won't have one either. Such a boost::get_c_array(arg) function (template) could be overloaded to support both std::array and boost::array. For details, please have a look at https://svn.boost.org/trac/boost/ticket/2857#comment:2 HTH, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center