|
Boost : |
Subject: Re: [boost] [optional] memory use for optional refs and ptrs
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-10-07 08:31:02
On 2010-10-07 13:37, Larry Evans wrote:
> [snip]
>
> A more complete facility use is here:
>
>
> https://svn.boost.org/trac/boost/browser/sandbox/variadic_templates/libs/composite_storage/sandbox/layout_all.cpp
>
> which produces output:
>
> mpl::size<result_t>=3
> ( size=1, align=1)
> ( size=4, align=4)
> ( size=8, align=8)
> composition
> < offset=8
> , size=16
> , align=8
>>
> padding_one=0
> padding_all=0
> composition
> < offset=4
> , size=8
> , align=4
>>
> padding_one=3
> padding_all=3
> composition
> < offset=0
> , size=1
> , align=1
>>
> padding_one=0
> padding_all=3
> layout0
> < size=0
> , align=1
>>
>
> which shows the padding after the char is 3 in order
> to make the alignment of the int at 4.
>
> HTH.
>
> -Larry
Thanks,
Rutger
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk