[range] the strange behavior of adjacent_filter

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[range] the strange behavior of adjacent_filter

Boost - Dev mailing list
Hi everyone,
Boost.Range has two GitHub issues on the strange behavior of adjacent_find
that have been sitting there for more than two years:


The behavior of the algorithm is not well described, but the intuitive
expectation would be that it returns for every pair of adjacent elements
that match the predicate the second of the pair. However, the unexpected
behavior of the algorithm is that for a non-empty range it literally always
returns the first element.

I do not think that this is by accident, because Ranges V3 also expose the
same behavior:

Does anyone happen to know the reasoning or motivation behind this behavior?


Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost