Re: [boost] Re: Re: optional<>: size optimization
Fernando Cacciola wrote: > padding 100%, but which will be quite easy to use is this: > > template > struct aligned_storage > { > void const* address() const ; > void* address(); > > // If tag_t fits in the padding, it is allocated there, > // else it is allocated separately (but in here) > tag_t const& tag() const ; > tag_t& tag(); > } Funny, that was my first prototype :o)... Yes, that's very good, if it's possible to implement I was concerned about, emmm..., alignment issues. I reckon tag_t type should be enforced to be an integral of some size. -- Joel de Guzman joel at boost-consulting.com http://www.boost-consulting.com http://spirit.sf.net ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Re: [boost] Re: Re: optional<>: size optimization
Gennadiy Rozental <[EMAIL PROTECTED]> wrote: > In fact it might be tempting to use all of them available: Yes. optional<> might not need it, but I guess variant<> could use them. BTW, is there a redist archive for variant<>? I'd like to test it, but I found an old link to a version which is not 1.30.0 compatible (MPL headers mainly). I see that the Sandbox version has been updated but I'm way too lazy to download the whole Sandbox just for it :) And, wasn't it accepted into Boost (I managed to miss the release, damn - I really like this library)? So, why was it not in 1.30.0, or at least in the CVS HEAD now? Giovanni Bajo ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost