Opened 11 years ago
Closed 11 years ago
#5993 closed Bugs (fixed)
range::accumulate is missing a const in a concept check
Reported by: | Owned by: | Neil Groves | |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | range |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | accumulate range const | Cc: |
Description
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.
Attachments (2)
Change History (3)
by , 11 years ago
Attachment: | range_accumulate_bug.cpp added |
---|
comment:1 by , 11 years ago
Milestone: | To Be Determined → Boost 1.50.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Resolved on trunk.
Note:
See TracTickets
for help on using tickets.
sample to reproduce the problem