GNOME Bugzilla – Bug 678139
Spurious warning with friend in different namespace: documented function `Singleton< A >' was not declared or defined
Last modified: 2012-12-26 16:41:53 UTC
Created attachment 216493 [details] 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.
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.
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?
Ah... my issue seems to only happen with template classes. Revised snippet: namespace animals { template <typename T> class milk_provider; /// Moo! class cow { template <typename T> 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?
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.
What about the problem I'm seeing? Is it fixed? Should I file a different bug?
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.