[range] the strange behavior of adjacent_filter
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: https://github.com/boostorg/range/issues/80 https://github.com/boostorg/range/issues/81 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: https://godbolt.org/z/P33j1qvT6 Does anyone happen to know the reasoning or motivation behind this behavior? Regards, &rzej;
participants (1)
-
Andrzej Krzemienski