|
Boost Users : |
From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2004-10-15 03:53:46
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
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