------- Comment #4 from bangerth at dealii dot org 2003-05-24 01:42 ------- Not a bug. Your code is roughly equivalent to this: ---------------------------------- template <class T> struct Ptr { ~Ptr() { if (ptr_) { if (ptr_->unref()) delete ptr_; ptr_ = 0; } } };
class Resource { public: void unref (); }; class AttributeValue; class AttributeDefinitionDesc { public: AttributeDefinitionDesc (); Ptr<AttributeValue> p; }; class AttributeValue : public Resource {}; -------------------------------- You are using AttributeValue in AttributeDefinitionDesc before the type is fully declared. In AttributeDefinitionDesc, you are instantiating Ptr<AttributeValue>, which requires knowledge of AttributeValue, which isn't available yet at that point. You need to reorder your class declarations. W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10960