Modify

Opened 16 years ago

Closed 15 years ago

#43 closed Bugs (Fixed)

shared_ptr and use of undefined type

Reported by: nobody Owned by: Peter Dimov
Milestone: Component: smart_ptr
Version: None Severity:
Keywords: Cc:

Description

class A;

class B
{
public:
    B();
// ~B();
private:
    boost::shared_ptr<A> a_p; 
};

B b;    // fails to compile 

The above line fails to compile with the message "use 
of undefined type 'A'".

It compiles successfully if B has an explicite 
destructor. i.e. the line "// ~B();" is uncommented.

I am using MSVC 6.

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Peter Dimov

Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Dimov.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.