From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-19 01:06:48
"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> "David Abrahams" <david.abrahams_at_[hidden]> wrote in message
> > Sometimes a library can be an effective tool of pressure on vendors,
> > I think in this case you have to change the design. It's not just an
> > issue of old vs new compilers. In general, even the new compilers
> > implement the MI optimization. Vendors are simply *not* going to
> > backwards-binary-compatibility just to make our smart pointers
> > and smart pointers simply *must* be small.
> I agree, sigh.
> There are two ways to redesign:
> (1) we add a template parameter "Base" to two policies and we build a
> linear hierarchy;
> (2) we assume that StoragePolicy always stores state so we store it as
> a member inside SmartPtr. Then, we assume the CheckingPolicy doesn't
> ever store any state and defines only static functions, so we don't
> store it anywhere nor derive from it. Finally, we assume that
> OwnershipPolicy may or may not store state so we derive (solely) from
You can't do this. StoragePolicy may need to introduce new public intrfaces.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk