
16 Oct
2011
16 Oct
'11
12:18 p.m.
On Sun, Oct 16, 2011 at 4:57 AM, Rhys Ulerich <rhys.ulerich@gmail.com> wrote:
Hi Olaf,
The current shared_array doesn't keep track of size. This greatly decreases it's usefulness. So I wrote a variant that does:
I like the concept of combining a shared_array with an iterator_range. In my own work I can see an instance knowing its length, type erasure, and possibly providing custom deleter semantics being handy.
A custom deleter is supported already via shared_array2(T* b, T* e, shared_ptr<void> const& n) This would also allow you to construct a shared_array2 from a memory mapped file, for example.
I'd personally call it a shared_range.
Why? The class owns the content. A range does not own the content. Olaf