
19 Oct
2011
19 Oct
'11
9:47 p.m.
On Wed, Oct 19, 2011 at 11:42 PM, Rhys Ulerich <rhys.ulerich@gmail.com> 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). -- Olaf