
21 May
2008
21 May
'08
4:45 p.m.
Hansi wrote:
Hello,
I want to use boost::any in a project where I want store different values or pointers. What is the fastest solution to make the different actions for different value types? Using the type() member function? Is it also possible to detect if the value is a pointer or a value?
I would suggest that such requirements indicate a necessity to rethink your design. Consider looking up the Liskov Substitution Principle to discuss why what you seem to be planning could seriously stab you in the face later.