Opened 21 years ago

Closed 19 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.

Change History (1)

comment:1 by Peter Dimov, 19 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.