Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-05-04 20:55:11

on 5/4/00 5:13 PM, Dietmar Kuehl at dietmar_kuehl_at_[hidden] wrote:

> At first sight, 'shared_ptr' seemed to be the right approach.
> Unfortunately, it is not for one of two reasons:
> - A simple forward declaration to the internal representation is
> insufficient or would require implemenation of some members I was
> hoping I don't have to write (ie. dtor and copy assignment). This is
> because the definition of the internal representation needs to be
> available if the object is destructed.

This shouldn't be neccessary. If I understand you correctly, I do this all
the time with boost::shared_ptr.

I assume you have a class directory_iterator which contains a
boost::shared_ptr member. All you should have to do is write an out-of-line
destructor for directory_iterator, which gets declared in a source (not a
header) file.


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