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

Spurious warning with friend in different namespace: documented function `Singleton< A >' was not declared or defined (Origin: bugzilla #678139) #4752

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 general for ---
Reported in version 1.8.1.1 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-06-15 05:29:38 +0000, john.x.foster@nab.com.au wrote:

Created attachment 216493
7z zip of visual studio 2008 project, with output

Friend template declaration in a different namespace causes the warning: "documented function `Singleton< A >' was not declared or defined."

The attached project has classes A and B - A generates the warning, B does not. The only difference is the namespace.

The output documentatioh is also incorrect. The class A appears twice in the class list, once in the correct namespace, and once in the globalnamespace.

On 2012-09-12 22:00:05 +0000, Matthew Woehlke wrote:

I can confirm at least the second half of this. Given a file like:

namespace foo
{
class cow;

/// Pig is documented.
class pig
{
friend class cow;
};
}

...cow will show up in both the global namespace and 'foo' namespace. Reproducible on 1.8.2.

I'd suspect that the misidentification of the namespace scope, as evidenced by the second problem, is also the underlying cause of the first.

On 2012-09-16 10:26:55 +0000, Dimitri van Heesch wrote:

Hi John,

In your example class B derived from a Singleton in non-existent class ns0. This causes the extra Singleton in the output. I'll hide this in such case.

Matthew,

With your snippet I did not manage to reproduce the problem. Can you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem?

On 2012-09-17 17:42:58 +0000, Matthew Woehlke wrote:

Ah... my issue seems to only happen with template classes.

Revised snippet:

namespace animals
{
template class milk_provider;

/// Moo!
class cow
{
template friend class milk_provider;
};
}

I can reproduce with the above, and the Doxyfile from https://bugzilla.gnome.org/attachment.cgi?id=224536. Given that, this seems like it may not be related. Would you like me to open a separate bug report?

On 2012-12-26 16:09:31 +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.

On 2012-12-26 16:36:50 +0000, Matthew Woehlke wrote:

What about the problem I'm seeing? Is it fixed? Should I file a different bug?

On 2012-12-26 16:41:53 +0000, Dimitri van Heesch wrote:

If you still see it in 1.8.3, then please file a new bug for it.
Having two different problems in one bug report doesn't work very well.

@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