On Tue, Jul 9, 2013 at 1:29 PM, Rob Stewart
On Jul 8, 2013, at 6:39 AM, Andrey Semashev
wrote: On Mon, Jul 8, 2013 at 1:49 PM, Rob Stewart
wrote: On Jul 8, 2013, at 4:21 AM, Andrey Semashev
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.