Boost logo

Boost Users :

Subject: Re: [Boost-users] [Q] scoped_ptr for forward declared classes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-03-31 12:38:44

V S P:
> Hello
> I have a situation where
> I have
> struct cmoney_impl_dtl; //hidden impl is in Cpp file
> struct myclass
> {
> boost::scoped_ptr<hidden_impl> myimpl_ptr;
> }

You must declare ~myclass in the header and implement it in the .cpp file.
If your class didn't have a destructor you'd need

myclass::~myclass() {}

Otherwise, just move the implementation of ~myclass into the .cpp file.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at