Boost logo

Boost Users :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2008-05-21 12:45:20


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.


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