
2 Apr
2010
2 Apr
'10
3:14 p.m.
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