From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-03-28 15:05:22
On Fri, Mar 28, 2008 at 11:26 AM, Mathias Gaunard
> Boost.variant provides visitation over an object whose types is within a
> certain set.
> To identify the type of the object, it uses an additional int that
> uniquely identifies the type of the object within the set.
> However, RTTI already provides unique identification for objects of
> polymorphic types within all types.
The typical use of a variant is to hold objects of types with value
semantics. Most such types are not polymorphic and so dynamic RTTI can
not be used to tell them apart.
Could you provide more info about your specific use case? Could you
use boost::any and dispatch based on RTTI?
-- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk