15 Oct
2004
15 Oct
'04
8:53 a.m.
Hello! I like the idea of containers (e.g. std::vector) of boost::any. But I'd like to execute some operation on each item of the sequence. Unfortenuately I would need to know the set of types in the container and check every one of them if I was going to use the std::for_each with a void(*)(boost::any&). That's not good at all. I'd like to pass a function object like: struct MyOperation { template<typename T> void operator() (T&) const; }; How can I do so? Is there any algorithm for doing so provided by boost? Frank