
26 Sep
2011
26 Sep
'11
12:11 p.m.
On 24/09/2011 17:45, Olaf van der Spek wrote:
On Fri, Sep 23, 2011 at 4:18 PM, Peter Dimov<pdimov@pdimov.com> wrote:
It's true that the separate pointer enables aliasing, but this is not the original reason for its existence. It supports pointer conversions (shared_ptr<T> converts to shared_ptr<U> when T* converts to U*.)
shared_array doesn't technically need aliasing or conversions, its implementation just mirrors shared_ptr.
Ah. BTW, why doesn't shared_array provide size()? IMO it'd be quite useful to have.
Because it's not storing that information.