Boost logo

Boost :

Subject: Re: [boost] RFC: A better shared_array
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2011-10-19 14:00:43

>>>> The current shared_array doesn't keep track of size. This greatly
>>>> decreases it's usefulness. So I wrote a variant that does:

> If one thinks of the class as a resource-owning iterator_range, I
> think a three member (shared_ptr/iterator_range) implementation gives
> more flexibility (e.g. sub range instances could track resource
> ownership against the same shared_ptr).

I extended the spirit of Olaf's shared_array2 implementation quite a
bit so that it really is a smart resource-managing iterator_range
called shared_range. The implementation (with documentation) and
tests are up at I've opted to
move resource allocating operation's like Olaf's shared_array2(size_t)
constructor into free functions in the spirit of make_shared and

Olaf, I've added your name to the implementation header in
shared_range.hpp. Please let me know if that's not okay with you.

Any feedback (or edge cases I've missed) greatly appreciated,

Boost list run by bdawes at, gregod at, cpdaniel at, john at