Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5930: data() for iterator_range
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-07 15:48:33
#5930: data() for iterator_range
-----------------------------------+----------------------------------------
Reporter: olafvdspek@⦠| Owner: neilgroves
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------+----------------------------------------
Comment (by rhys.ulerich@â¦):
Referring to...
> > > return empty() ? NULL : &front();
> > This is rather dangerous. It only works if the iterator points to
contiguous storage.
> Right, it should only be provided in that case.
I asked...
> > How can a member method be provided only under certain runtime
conditions?
> It's not a runtime condition.
An iterator_range knowing that it represents a contiguous region of memory
seems like a runtime condition to me. What am I missing?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5930#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC