Boost logo

Boost Users :

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


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.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at