Re: [boost] Re: Re: optional<>: size optimization

2003-04-21 Thread Joel de Guzman
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 i

[boost] Re: Re: optional<>: size optimization

2003-04-21 Thread Fernando Cacciola
Joel de Guzman <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David B. Held wrote: > > "Fernando Cacciola" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> [...] > >> I think I like this enhanced version. > >> 'max_size_type_that_fit_in_padding' > >> must better

[boost] Re: Re: optional<>: size optimization

2003-04-20 Thread Fernando Cacciola
"Gennadiy Rozental" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > > In fact, it might be tempting to use the other bits as well. > > For example, I'd imagine a variant implementation that uses > > 8 bits to flag the currently active type. I imagine this interface: > > > >

Re: [boost] Re: Re: optional<>: size optimization

2003-04-20 Thread Giovanni Bajo
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