Boost logo

Boost :

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

On Wed, Oct 19, 2011 at 4:47 PM, Olaf van der Spek <ml_at_[hidden]> wrote:
> On Wed, Oct 19, 2011 at 11:42 PM, Rhys Ulerich <rhys.ulerich_at_[hidden]> wrote:
>>>> ForwardRange.  To have shared_range::operator= logically accomplish
>>>> the same thing, I opted for it copy a ForwardRange but not to perform
>>>> any shared resource ownership.  In that case, the shared_array
>>>> shared_range::p_ has no well-defined semantic (since nothing's
>>>> managed) which makes data() (among other things) not well-defined
>>>> concepts.  Consequently, no data() member nor any access to the
>>> data() would just return empty() ? NULL : &front();
>> You just implemented begin().  It's a range. :)
> No, data() returns a pointer, while begin() returns an iterator (which
> might be, but doesn't have to be, a pointer).

True in general. This implementation publicly inherits from
iterator_range<T*>. Are there cases where iterator_range<T*>::begin()
could return anything but a pointer?

- Rhys

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