|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-09 11:44:56
"Joao Abecasis" <jpabecasis_at_[hidden]> wrote in message news:
> Hi!
Hi!
First, I accidentally posted a reply which contained no new content.
> I have written a small utility class to provide "empty member
> optimization" for arbitrary types. The implementation makes use of the
> empty base class optimization (EBCO) but avoids injection of the class.
> A uniform and contained interface is exposed wether the optimization
> applies or not:
>
> <snip>
>
> I believe this could be used as the basis for a compressed_tuple.
Second, I don't have time to look into the details of your implementation, but I
wan't to make sure you're aware of the EBO problems Dave Held ran into with his
policy_ptr, based on the loki SmartPtr. Basically, compilers will apply EBO once
or twice for a given class, and that's it. The exception seems to be recent
versions of gcc (I don't remember if its 3.3 or 3.4).
If you haven't seen it, you should look at his utility optimally inherit, in the
sandbox: http://tinyurl.com/4yyzs.
(I apologize in advance if these remarks are way off base!)
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk