Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-05-06 12:45:58

At 09:55 PM 5/4/00 -0400, Dave Abrahams wrote:

>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
>> 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
>destructor for directory_iterator, which gets declared in a source
(not a
>header) file.

Cool! Why didn't I think of that?

Could you write up a short example for insertion in the smart_ptr.hpp


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