Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-04-03 09:20:37


----- Original Message -----
From: "Shankar Sai" <sai.shankar_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, April 03, 2001 2:47 AM
Subject: RE: [boost] Re: scoped_ptr: trivial dtor?

>
>
> |> ----- Original Message -----
> |> From: "Beman Dawes" <bdawes_at_[hidden]>
> |>
> |> > Although you have to be careful that the destructor is trivial, it
> |> > is highly desirable to be able to use scoped_ptr with
> |> incomplete types.
> |>
> |> Why is that desirable?
>
> Support the pimpl idiom for forward declared types?

// C.hpp
class Cimpl;
class C {
public:
  ~C();
private:
  boost::scoped_ptr<Cimpl> impl;
};

// C.cpp
class Cimpl {
};

C::~C()
{
}

Am I missing something, or are you talking about a different idiom?

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

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