Boost logo

Boost :

From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-09 09:03:06


On Wed, 8 Mar 2000, Dave Abrahams wrote:

> on 3/8/00 8:26 AM, Beman Dawes at beman_at_[hidden] wrote:
>
> > In other words, it would be complete (although not necessarily
> > desirable) to have:
> >
> > deep_opaque_ptr // also known as CopyPtr
> > deep_ptr
> > shared_opaque_ptr
> > shared_ptr // same as current
> > scoped_opaque_ptr
> > scoped_ptr // same as current
>
> I don't think that the opacity distinction requires a separate class, if the
> class template is parceled appropriately into source and header files.

Be careful. If the compiler can SEE the definition for a function it will
generally try to instantiate it. Which might lead to a to a "improper use
of undefined type" error message. Thus if you include the implantation of a
smart pointer without also including ALL the header files for the complete
definition for ANY smart pointer types you are working with you can run
into trouble.

With export this becomes a non-issue however very few compilers currently
support export and even fewer (possible none) support it correctly and
completely.

---
Kevin Atkinson
kevinatk_at_[hidden]
http://metalab.unc.edu/kevina/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk