New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen confuses C++ private nested classes with same name in base and derived class (Origin: bugzilla #686956) #4932

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component build for ---
Reported in version 1.8.2 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-10-26 20:15:04 +0000, Stephen McCracken wrote:

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

/// 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;
};

On 2012-10-26 20:21:30 +0000, Stephen McCracken wrote:

Created attachment 227386
Testcase with example incorrect collaboration diagram

On 2012-10-27 21:54:08 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2012-12-26 16:09:18 +0000, Dimitri van Heesch wrote:

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.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment