|
Boost Users : |
From: Bruno Martínez (br1_at_[hidden])
Date: 2005-11-23 12:07:06
On Wed, 23 Nov 2005 08:34:26 -0200, Peter Dimov <pdimov_at_[hidden]> wrote:
> Bruno Martínez wrote:
>> Hi.
>>
>> I had the same question that is answered there, but the answer didn't
>> fit my problem. I'm using scoped_ptr<node> inside node itself, so
>> node is incomplete at the point of use. That forbids using auto_ptr,
>> IIUC.
>
> You can use a scoped_ptr member with an incomplete type, as long as you
> include out of line default constructor (if you need one) and destructor.
I know. The problem is that I want incomplete types support *and* release
member function.
I don't seem to require a destructor in this case, for vc71 or gcc3.4:
#include <boost/scoped_ptr.hpp>
struct node {
boost::scoped_ptr<node> next;
};
int main()
{
node n;
}
Bruno
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net