Boost logo

Boost :

Subject: Re: [boost] [DynamicAny] Feedback
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-03-04 12:52:19


On 3/4/2011 5:36 PM, Sebastian Redl wrote:
>
> On 04.03.2011, at 17:15, Daniel Larimer wrote:

> It would be possible to implement dynamic_any_cast for the existing
> boost::any by using compiler-specific implementation knowledge. For
> example, on GCC, you could access type_info::__do_upcast to do the
> casting.

Maybe the traits I suggested long time ago could solve this problem in
some variant.

http://www.comeaucomputing.com/iso/lwg-active.html#849

That is, if we could determine a suitable root class with a virtual
function, we could simply instantiate holder<root*>. (this would also
generate less code).

Wold not work if there is no unique base class I guess;

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk