Boost logo

Boost :

From: Alex Rosenberg (alexr_at_[hidden])
Date: 2002-04-18 22:00:26

on 4/18/02 6:32 PM, David Abrahams at david.abrahams_at_[hidden] wrote:

> From: "Alex Rosenberg" <alexr_at_[hidden]>
>> Most smart pointers want to
>> be very small and low overhead.
>> Perhaps a C++0x extension could fix this:
>> class foo : public register empty_base { ... };
>> Here I'm using "register" since it already indicates that the address cannot
>> be taken, but any suitable indicator could be used to resolve this.
> Implementations are already allowed to optimize away empty bases, and
> some do.

I have yet to see a compiler that can perform the empty base optimization
with multiple bases. Of course, I'd love to be surprised.

> My proposal is to use a single composite policies base class to avoid
> the MI overhead implicit in quite a few compilers.

If all policies can be reduced to a single base, then there's no problem.
Loki uses MI policies in several areas. Andrei previously expressed concern
over this issue in a post to comp.std.c++:


| Alexander M. Rosenberg <> |
| Nobody cares what I say. Remove the underscore to mail me. |

Boost list run by bdawes at, gregod at, cpdaniel at, john at