Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9565: [boost] [range] size.hpp template parameter did not match the requirement
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-21 17:24:49
#9565: [boost] [range] size.hpp template parameter did not match the requirement
-----------------------------------------------+------------------------
Reporter: Lin, Yi-Li <record.nctu.cis91@â¦> | Owner: neilgroves
Type: Patches | Status: closed
Milestone: To Be Determined | Component: range
Version: Boost 1.55.0 | Severity: Problem
Resolution: invalid | Keywords:
-----------------------------------------------+------------------------
Changes (by neilgroves):
* status: new => closed
* resolution: => invalid
Comment:
That's not quite correct. The implementation for iterators requires
RandomAccess iterators, but this function is designed to allow extension
for the common cases where we can provide customisation for container that
have lesser iterators but still provide O(1) size such as std::list. Hence
one of the goals of boost::size() is to support optimal O(1) size
computation for ranges where this is known. std::list clear is
bidirectional but it is quite possible to have containers or ranges that
model the SinglePassRange concept and provide range_size to be found by
ADL.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9565#comment:1> 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:15 UTC