Subject: [Boost-bugs] [Boost C++ Libraries] #5993: range::accumulate is missing a const in a concept check
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-08 06:21:09
#5993: range::accumulate is missing a const in a concept check
----------------------------------------------------+-----------------------
Reporter: Julien Nitard <julien.nitard@â¦> | Owner: neilgroves
Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.47.0 | Severity: Problem
Keywords: accumulate range const |
----------------------------------------------------+-----------------------
The first overload of boost::accumulate, (const SinglePassRange&, Value)
is not checking for the proper concept. It checks for the non-const
version, which causes problem when passing a range that is not mutable.
The following line must changed from:
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
To:
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>
));
Like it is in the 2nd overload.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5993> 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