From: rz0 [mailto:rz0@yahoo.com] Hi Bjorn
Thank you very much for the reply.
Unfortunately these classes are provided to me and as part of the requirements, I must be able to work with them. In re-thinking the problem, it seems that I'm in desperate need of a polymorphic container - i.e.:
Does boost have any polymorphic containers?
Thanks very much in advance.
I don't think that polymorphism is the cure - you'll always need to downcast
the pointer as the signatures differ. However, there is support in Boost for
what you're trying to do - through boost::any. Like I said before, the
solution will not be very clean, but it will work.
The code snippet below seems to do what you're asking for:
#include <iostream>
#include <algorithm>
#include <vector>
#include