|
Boost : |
Subject: Re: [boost] [array] change proposal for the c_array() function
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-03-15 03:40:13
Niels Dekker - mail address until 2010-10-10 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; }
>
> 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; }
Why not simply accessing elems directly? It's public.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk