14 Jun
2005
14 Jun
'05
8:39 p.m.
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