Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8011: iterator_range::size() is not SFINAE-friendly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-13 00:19:54
#8011: iterator_range::size() is not SFINAE-friendly
---------------------------------------------------------+------------------
Reporter: Jonathan Wakely <jwakely.boost@â¦> | Owner: neilgroves
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------------------------+------------------
Comment (by jwakely.boost@â¦):
I use `boost::zip_iterator`so to construct an end iterator that is
reachable from {r1.begin(), r2.begin(), ...} it needs to be
{r1.begin()+N, r2.begin()+N, ...} (where N is the size of the smallest
range) not {r1.end(), r2.end(), ...} because `operator==` for
`zip_iterator` is only true if all members of the tuple are equal.
https://gitorious.org/redistd/redistd/blobs/master/include/redi/zip.h
Since I switched from using the size() member it needs fixing to avoid
calling both `std::distance()` and `std::advance()`, but the point of this
ticket is that I'd prefer to use size() when possible
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8011#comment:4> 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:12 UTC