Boost logo

Boost :

Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-25 08:21:11


On 07/23/12 11:43, Steven Watanabe wrote:
> AMDG
>
> On 07/23/2012 07:35 AM, Andrey Semashev wrote:
>> On Wednesday 18 July 2012 01:13:20 Lorenzo Caminiti wrote:
>>> Hello all,
>>>
>>> *** The review of Steven Watanabe's proposed Boost.TypeErasure library
>>> begins on July 18, 2012 and ends on July 27, 2012. ***
>>
>> Hi,
>>
>> This is not yet a complete review but rather some thoughts and questions I
>> came up with as I read the documentation and the source code. I did not follow
>> the discussion so my apologies if these have already been answered.
>>
>> 1. As I can see, the implementation contains a function table to implement
>> concepts, am I right? Why this table is stored per-object and not created
>> statically, for every stored type/concept combination? Considering the number
>> of concepts, this table can take much space in every "any" instance.
>>
>
> The table is created statically. The
> table is only constructed dynamically
> for conversions.
>
The output of the attached shows:

./table_size.exe
sizeof(void*)=8
_a,_b:table size=24
_a,_b,_c,_d:table size=24

indicating that the table size is not dependent
on the number of concepts. However, it does
show the table size is considerably larger
than the size of a virtual function table
pointer (which I assume is the same size as void*).

HTH.

-Larry




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