After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776986 - C++11 friend declaration with namespace produces a warning
C++11 friend declaration with namespace produces a warning
Status: RESOLVED DUPLICATE of bug 729237
Product: doxygen
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2017-01-07 16:23 UTC by Vladimír Vondruš
Modified: 2017-12-25 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vladimír Vondruš 2017-01-07 16:23:49 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)!
Comment 1 Vladimír Vondruš 2017-01-07 16:31:48 UTC
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).
Comment 2 Dimitri van Heesch 2017-12-25 13:24:56 UTC
Fixing bug729237 also fixes this one.

*** This bug has been marked as a duplicate of bug 729237 ***