any stl/boost functors to call operator()
Posted
by Voivoid
on Stack Overflow
See other posts from Stack Overflow
or by Voivoid
Published on 2010-06-16T20:15:25Z
Indexed on
2010/06/16
20:22 UTC
Read the original article
Hit count: 170
template <typename T>
struct Foo
{
void operator()(T& t) { t(); }
};
Is there any standart or boost functor with the similar implementation?
I need it to iterate over container of functors:
std::for_each(beginIter, endIter, Foo<Bar>());
Or maybe there are other way to do it?
© Stack Overflow or respective owner