From: Eric Friedman (ebf_at_[hidden])
Date: 2003-09-25 18:16:33
Rozental, Gennadiy wrote:
>>sizeof(variant<int>) is still is 8.
> This is probably because Eric is using int as a type for selector member. I
> mentioned it to him during review that it should be char. On the other hand
> I found that In majority of the cases (when you are not or could not ignore
> alignment) size will be the same.
If you #define BOOST_VARIANT_MINIMIZE_SIZE then the current
implementation will employ a char for the which_ type when possible.
However in my (limited) tests, this did not reduce the size of variant
because of alignment issues. Accordingly, I do not #define the symbol by
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk