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 643655 - typedef to member function not found (C++)
typedef to member function not found (C++)
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.3
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-03-02 10:22 UTC by Kris Thielemans
Modified: 2011-03-28 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kris Thielemans 2011-03-02 10:22:19 UTC
Below is a case where the definition of a 2nd constructor is not matched to its declaration. The warning issued by doxygen says

doxygentests/test/member-function-problem.cxx:16: warning: no matching class member found for 
  B::B(void(B::*pom)
Possible candidates:
  B::B()
  B::B(void(B::*pom)())

It seems that the parser didn't properly understand the typedef (for MemberF), as everything works fine when the declaration and definition use the typedef.

Also note the missing brackets in the log message (line above "Possible candidates"). Maybe that provides a clue?

--------------------------
//! class doc
class B
{
public:
  typedef void (B::*MemberF)();
  //! def
  B();
  //! other constructor
   B( void (B::*pom)());
  // B( B::MemberF pom); // ok if using this declaration instead
};

/*! some more doc */
B::B(B::MemberF pom)
{}
--------------------------
Remarkably, the bug disappears when removing the first (default) constructor.

This seems related to Bug 356204, but I checked that 1.7.3 doesn't complain about those test files anymore.

I used doxygen -g to generate a default Doxyfile for this test.

Thanks

Kris
Comment 1 Dimitri van Heesch 2011-03-27 15:18:44 UTC
Confirmed. Should be fixed in the next release
Comment 2 Dimitri van Heesch 2011-03-28 14:19:08 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.4. 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.