Boost logo

Boost :

Subject: Re: [boost] [shared_array] Why not in C++11 ?
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-07-08 07:28:58


On 8 July 2013 12:20, Andrey Semashev wrote:
> On Mon, Jul 8, 2013 at 3:04 PM, Sid Sacek <ssacek_at_[hidden]> wrote:
>>
>> What I mean is, operator->() does not exist. How can it be a pointer when it is not possible to use pointer notation?
>
> In that case I'd consider this a bug.

It's consistent with the interface of std::unique_ptr<T[]>.

You can use p.get()->x instead of p->x if you really want to use that
notation to access the first element only, but how often do you really
want to access the first element of an array, and p[0] isn't just as
natural?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk