Boost logo

Boost :

Subject: Re: [boost] [shared_array] Why not in C++11 ?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-07-09 05:40:04


On Tue, Jul 9, 2013 at 1:29 PM, Rob Stewart <robertstewart_at_[hidden]> wrote:
> On Jul 8, 2013, at 6:39 AM, Andrey Semashev <andrey.semashev_at_[hidden]> wrote:
>
>> On Mon, Jul 8, 2013 at 1:49 PM, Rob Stewart <robertstewart_at_[hidden]> wrote:
>>> On Jul 8, 2013, at 4:21 AM, Andrey Semashev <andrey.semashev_at_[hidden]> wrote:
>>>
>>>> Size could be implied from other components around the pointer. E.g. you could have multiple buffers of the same size encapsulated in a class that maintains this invariant.
>>>
>>> That's a very limiting view.
>>
>> Why? I just suggested a use case where embedded size is not needed.
>
> You were using it to suggest the size was not needed for any use case, or at least that's how I read it.

No, I responded to Sid who suggested that dynamic arrays in shared_ptr
without (embedded) size are useless.

>>>> Specializing the interface based on the template argument is not intuitive, IMHO.
>>>
>>> We have that already with the subscript operator.
>>
>> That is not counterintuitive because you can apply the operator to the raw pointer.
>
> Granted, but a deleter is counterintuitive, relative to raw pointers, too. The class name begins with "smart" for a reason.

But it ends with "pointer", not "container". :) Anyway, I think we
understood each other's points.


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