1 Mar
2005
1 Mar
'05
9:45 a.m.
Matthias Kaeppler wrote:
template<typename It> class indirect { const std::unary_function
& fctor_; public: indirect( const std::unary_function & fctor ): fctor_(fctor) {} bool operator()(It i1, It i2) const { typedef typename std::iterator_traits<It>::value_type value_type; return fctor_ ()(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