Boost logo

Boost :

Subject: Re: [boost] Change in range requirements
From: Neil Groves (neil_at_[hidden])
Date: 2015-02-01 14:23:27

On 30 January 2015 at 18:26, Ganssauge, Gottfried <
Gottfried.Ganssauge_at_[hidden]> wrote:

> Please consider the following program:
> It works brilliantly with boost-1.54 although std::istream_iterator is
> only an input iterator.
> Recently I tried switching to boost-1.57, but suddenly this program
> stopped working - it won't compile any longer, because istream_iterator is
> not a forward_iterator:
The reason it stopped working is the specified requirements (which were
already too strict) became tested with concept assertions. The adaptors
filtered and transformed have unnecessarily strict requirements for the
input to be a ForwardRange. These were compiling previously because much of
the library has been improved with concept assertion coverage.

I raised this as Ticket 10988 (
I have fixed the code and docs on the develop branch. This will need to
cycle through the tests on various compilers and platforms before I can
merge to master so that it will be in the next release. I'm very sorry for
any inconvenience.

You can work-around the problem either by merging the change, using the
develop branch, or by disabling the concept assertions in Boost.Range by
defining BOOST_RANGE_ENABLE_CONCEPT_ASSERT to 0. I imagine the optimal
solution for you will depend on how easy it is to patch the code, or switch
branches. The good news is that you ought to be able to define
BOOST_RANGE_ENABLE_CONCEPT_ASSERT as 0 and be able to proceed without
patching or recompiling boost.

> Why is it, that the requirements for certain range adaptors (e.g.
> filtered, transformed) suddenly exclude input ranges?
> The corresponding iterator adaptors keep working...
As per my previous comment, I had the requirement for the filtered adaptor
excessively strict. The problem you are experiencing with the transformed
adaptor does not appear to be the same issue. I have checked the source and
it indeed checks for the range to model the SinglePassRange Concept.

> Gottfried Ganßauge
> Entwickler
> Content Engineering & Development

Please do let me know the specifics about any issue you are having with
other Boost.Range Adaptors. I'd be happy to help resolve any defects.

Neil Groves

Boost list run by bdawes at, gregod at, cpdaniel at, john at