|
Boost Users : |
From: Matthias Kaeppler (nospam_at_[hidden])
Date: 2005-03-01 04:45:22
Matthias Kaeppler wrote:
> template<typename It>
> class indirect
> {
> const std::unary_function<It,bool>& fctor_;
> public:
> indirect( const std::unary_function<It,bool>& fctor ): fctor_(fctor) {}
> bool operator()(It i1, It i2) const
> {
> typedef typename std::iterator_traits<It>::value_type value_type;
> return fctor_<It,bool>()(i1,i2);
> }
> };
>
> Would that work?
>
Okay, that doesn't work :)
But how would I write such an adaptor? I'm kind of lost. (Actually, I
wonder why there isn't already such a thing. It's a pretty common task
ain't it).
-- Matthias Kaeppler
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net