Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-09-04 05:12:29

On 09/04/2011 11:32 AM, Artyom Beilis wrote:
>> What if we keep the pointer to the type_info in impl, but make it
>> directly accessible, not via a virtual call? This would keep sizeof(any)
>> to one pointer and only add one indirection to any4. IMHO, that would be
>> the best solution.
> This is fine as well. However I don't see too much advantage
> of having one pointer instead of two.

Empty anys will take less space, which may be significant. Moving and
swapping will also be cheaper.

> The most important is **not reinvent** RTTI as it would
> not work well.

No argument from me on that. :)

Boost list run by bdawes at, gregod at, cpdaniel at, john at