|
Boost : |
Subject: Re: [boost] [array] change proposal for the c_array() function
From: Niels Dekker - mail address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2009-03-15 05:57:58
>> No need to change the original implementation of array::c_array()!
>> Your change of its return type should be sufficient:
>> T (&c_array())[N] { return elems; }
Andrey Semashev wrote:
> Why not simply accessing elems directly? It's public.
It looks like it's indeed okay to access boost::array::elems directly.
But tr1::array::elems is marked as "Exposition only". Other TR1
implementations have indeed named their tr1::array data member differently.
Unfortunately c_array() is also specific to Boost. So I've proposed to
add this member function to std::array as well (LWG issue #930),
returning a reference to the array. (Including overloads for const and
rvalue arrays.)
Kind regards, Niels
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk