GNOME Bugzilla – Bug 776986
C++11 friend declaration with namespace produces a warning
Last modified: 2017-12-25 13:24:56 UTC
Running Doxygen (latest Git or any version before, doesn't matter) on the following snippet: namespace Foo { /** @brief Class B */ struct B { /** @brief Constructor */ B(); }; /** @brief A class */ class A { friend Foo::B; }; } produces this warning: a.cpp:11: warning: no matching class member found for B() If I remove the constructor from the B class, the warning gets changed to: a.cpp:11: warning: documented symbol `B' was not declared or defined. If I say just `friend B`, the warning disappears. Also, if I say it the C++03 style, `friend class Foo::B`, there is no warning as well. Note that I'm not particularly interested in having the friend declarations documented (HIDE_FRIEND_COMPOUNDS=YES in my Doxyfile), I'd just like to not have this warning in the output, as it occurs pretty often in my codebase and makes the real warnings harder to see. Thanks a lot (and thanks for the continuing dedication to this project)!
Might be related to the problem described in https://bugzilla.gnome.org/show_bug.cgi?id=729237 though I'm providing more details (failed to search properly first, sorry).
Fixing bug729237 also fixes this one. *** This bug has been marked as a duplicate of bug 729237 ***