GNOME Bugzilla – Bug 134217
Mismatched documentation for functions having same name.
Last modified: 2007-09-22 18:49:55 UTC
Doxygen 1.3.5 When the documentation of class C should contain both a member function, in the example below N::C::f(), and a non-member function N::f() having the same prototype (and made part of the C class documentation via the \relates command), the produced documentation contains just one of the two functions (the member function), with brief and detailed descriptions mixed up; in particular, the brief description is the wrong one. =========================== bug.cc ============================= //! A namespace namespace N { //! A class. class C { public: //! A static member. /*! This is the detailed documentation of the static member function N::C::f(). */ static void f(); }; //! A shorthand for C::f(). /*! \relates C This is the detailed documentation of the function N::f(). */ void f(); } void N::C::f() { // The static function inside class C. } /*! \relates N::C */ void N::f() { // The function outside class C. C::f(); } ======================= Doxyfile ============================= To see the error, produce a standard Doxyfile and modify the following entries: ALWAYS_DETAILED_SEC = YES EXTRACT_ALL = YES EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES INPUT = bug.cc SOURCE_BROWSER = YES INLINE_SOURCES = YES
I (just) now see that this behavior is explicitly listed as a known problem in the documentation of Doxygen: It is not possible to insert a non-member function f in a class A using the \relates or \relatesalso command, if class A already has a member with name f and the same argument list. So, I will mark this as NOTABUG.