Re: [Boost-bugs] [Boost C++ Libraries] #9851: Iterators from rang have different category than the range

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9851: Iterators from rang have different category than the range
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-06 11:10:12


#9851: Iterators from rang have different category than the range
-------------------------------+------------------------
  Reporter: anonymous | Owner: neilgroves
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: range
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------
Changes (by neilgroves):

 * status: new => assigned

Comment:

 The reason you originally get 5,3 as a result is because the Filtered
 adaptor requires a ForwardPassRange since it needs to check adjacent
 elements.

 http://www.boost.org/doc/libs/1_55_0/libs/range/doc/html/range/reference/adaptors/reference/filtered.html

 Your code snippet is legal since it isn't a single-pass range as the
 input. Passing a genuine SinglePassRange to an adaptor requiring a
 ForwardRange will typically trigger a compile-time error with a Concept
 Assert. Having looked through the code I can see that I should add some
 more concept assert statements to ensure invalid code fails to compile.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9851#comment:3>
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:16 UTC