Boost logo

Boost Users :

From: Vyacheslav Kononenko (groups_at_[hidden])
Date: 2005-06-14 15:39:25


Hi,

I could not come with usable name for such thing but
it could be usable anyway. So it is like find_if but
applies a function to an sequence and return first non
void type that function returned. So implementation
would be trivial:

template< typename Sequence, typename Func >
struct find_type : fold< Sequence, void_, if_<
is_void_< _1 >, Func< _2 >, _1 > {};

If it can be implemented by current set of algorithms
please point me out.

Regards,
Vyacheslav


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