|
Boost : |
From: Christian Kreibich (kreibich_at_[hidden])
Date: 2002-04-07 08:02:54
Peter Dimov wrote:
>
> This problem is not shared_ptr-specific; it usually comes up with containers
> and iterators. The solution (within the current language) is to define the
> types outside the class:
>
> class A;
> typedef boost::shared_ptr<A> A_ptr;
> class A
> {
> public:
> typedef A_ptr ptr;
> };
>
> You can still keep the A::ptr notation, but now you can break circular
> dependencies by using the global A_ptr alias.
Mhmm ... thanks Peter, I had already tried this, and get the following
result using g++ (2.95.4):
boost/checked_delete.hpp:26: `sizeof' applied to incomplete type `A'
boost/checked_delete.hpp:27: invalid use of undefined type `class A'
That's when I gave up :) Am I missing something?
Best regards,
Christian
-- ________________________________________________________________________ http://www.whoop.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk