[range] adjacent_filtered?

Hi, Out of curiosity, I'm still challenging to implement the range library proposal. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1871.html I couldn't understand what 'adjacent_filtered' must do. Could you give some examples? Regards, -- Shunsuke Sogame

shunsuke wrote:
Hi,
Out of curiosity, I'm still challenging to implement the range library proposal. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1871.html
I couldn't understand what 'adjacent_filtered' must do. Could you give some examples?
For example, to create a "unique" view of a range, you use a binary predicate biPred(x,y) equal to x != y. I started out with wanting to immitate std::unique() lazily, and then generalized it to adjacent_filered(). Bascially, if you want to filter a range on an single objecte basis, then why not on basis of adjacent objects? -Thorsten

Thorsten Ottosen wrote:
shunsuke wrote:
Hi,
Out of curiosity, I'm still challenging to implement the range library proposal. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1871.html
I couldn't understand what 'adjacent_filtered' must do. Could you give some examples?
For example, to create a "unique" view of a range, you use a binary predicate
biPred(x,y) equal to x != y.
I started out with wanting to immitate std::unique() lazily, and then generalized it to adjacent_filered(). Bascially, if you want to filter a range on an single objecte basis, then why not on basis of adjacent objects?
Maybe I got it. In fact, my implementation had been wrong. :-( Thanks! -- Shunsuke Sogame
participants (2)
-
shunsuke
-
Thorsten Ottosen