Boost logo

Boost :

Subject: Re: [boost] [DynamicAny] Feedback
From: joaquin_at_[hidden]
Date: 2011-03-04 01:55:07


Daniel Larimer escribió:
> I recently ran into a problem where I wanted to retrieve the value stored in a boost::any by casting to a base class. Unfortunately, boost::any requires you cast out the exact type as that held.
>
> Boost.DynamicAny is a vairant on Boost.Any which provides more flexible dynamic casting of the underlying type. Whereas retreiving a value from Boost.Any requires that you know the exact type stored within the Any, Boost.DynamicAny allows you to dynamically cast to either a base or derived class of the held type.
> Boost.DynamicAny passes all of the same unit tests as Boost.Any, but additionally supports the following test:
> [...]
>

What's the trade-off? I mean, does Boost.DynamicAny use more memory than
Boost.Any, is it slower?

Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at.
http://www.tid.es/ES/PAGINAS/disclaimer.aspx


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