Boost logo

Boost :

Subject: Re: [boost] A Pimpl variant
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-04-02 11:14:55


AMDG

Gottlob Frege wrote:
>> How? Does you RecklessPimpl class have an alignment parameter?
>>
>>
>
> it would have a default alignment parameter. Defaulting to max
> alignment based on the size parameter. Ie a 4 byte size would default
> to 4 byte alignment. Size >= 8 means 8 byte alignment (typically). The
> actual template to find a primitive type with the right alignment
> based on size is pretty hairy. Not sure if I ever had a version that I
> was happy with.
>

Can't you just use boost::aligned_storage?

In Christ,
Steven Watanabe


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