GNOME Bugzilla – Bug 686956
Doxygen confuses C++ private nested classes with same name in base and derived class
Last modified: 2012-12-26 16:09:18 UTC
If a C++ base class ClassA and a derived class ClassB both use the "private implementation" pattern and define a nested private class with the same name (say ClassA::Implementation and ClassB::Implementation), then ClassB's collaboration diagram and member data documentation incorrectly links to ClassA::Implementation rather than ClassB::Implementation. Note, however, that the "Classes" section refers to the correct type. The example below illustrates the issue. I will attach a source file and a Doxygen config file that illustrate the problem. You should only need to change the Doxygen working directory in order to run it. Also reproducing the source file below for completeness: -------------------------------------------------------- #include <boost::scoped_ptr.hpp> #include <string> /// This is a base class with a private implementation. class ClassA { public: ClassA(); private: class Implementation; boost::scoped_ptr< Implementation > mImpl; }; /// This is a derived class with its own independent private implementation. class ClassB : public ClassA { public: ClassB(); private: class Implementation; boost::scoped_ptr< Implementation > mImpl; }; ClassA::ClassA() : mImpl() {} ClassB::ClassB() : ClassA(), mImpl() {} /// This is the private implementation for ClassA. class ClassA::Implementation { public: Implementation() {} std::string mData; }; /// This is the private implementation for ClassB. class ClassB::Implementation { public: Implementation() {} std::string mData; };
Created attachment 227386 [details] Testcase with example incorrect collaboration diagram
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.3. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant.