Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-08-17 09:54:49


On Friday, August 17, 2001, at 10:16 AM, Beman Dawes wrote:

>> One of the possibilities I would like to see explored is merging
>> shared_ptr and shared_array under the same name using a specialization
>> on array types. That is instead of:
>>
>> shared_ptr<int> p1(new int);
>> shared_array<int> p2(new int[3]);
>>
>> rather this:
>>
>> shared_ptr<int> p1(new int);
>> shared_ptr<int[]> p2(new int[3]);
>>
>> This is purely a naming issue. I don't see any issues regarding
>> generic
>> programming or the like.
>
> Does this actually work? I tried it some years ago, and couldn't get
> the
> specialization working. But the compilers I tested with have all had
> numerous updates since then; that may have fixed the problems.

I've got an (unshipped) auto_ptr set up like this (works great). I'd be
happy to share it if there is interest.

-Howard


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