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 729017 - function object in member initializer causes documentation loss
function object in member initializer causes documentation loss
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.7-GIT
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-04-26 15:06 UTC by Peter A. Bigot
Modified: 2014-08-21 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
reproducing code (339 bytes, text/x-csrc)
2014-04-26 15:06 UTC, Peter A. Bigot
Details
compilable reproducer (372 bytes, text/x-csrc)
2014-04-27 15:39 UTC, Peter A. Bigot
Details

Description Peter A. Bigot 2014-04-26 15:06:18 UTC
Created attachment 275210 [details]
reproducing code

If a C++ constructor contains a member initializer the value of which is a function object, no documentation is produced for member functions that follow the constructor.

A reproducing example is attached.  Using "doxygen test.h" will produce documentation that excludes the is_valid() member function.  Changing the preprocessor conditional to initialize putter_ with a null pointer produces documentation that includes is_valid().

Experimentation suggests it is the presence of the curly-braces inside the initializer value that causes the problem.
Comment 1 Dimitri van Heesch 2014-04-27 14:40:07 UTC
Can you check the example? The error case is disabled and when enabled the example doesn't seem to compile with g++ -std=c++11 (I already added the missing ; at the end of the class). 

Here is the error I get
error: no viable conversion from '<lambda at test.h:10:11>' to 'put_fn_type'
      (aka 'void (*)(char)')
  putter_([this](char c) { (void)c; })
Comment 2 Peter A. Bigot 2014-04-27 15:39:31 UTC
Created attachment 275269 [details]
compilable reproducer

Use include "test.h" in otherwise empty test.c.  g++ -std=c++11 -c with gcc 4.9.0 will compile this.
Comment 3 Peter A. Bigot 2014-04-27 15:40:00 UTC
Sorry; I didn't bother trying to make it compile, I just used "doxygen test.h" to verify the underlying doxygem problem was reproducible with no external dependencies.  I've attached a slightly edited version where the default behavior is to drop the documentation and that will compile when included into an otherwise empty implementation file.  Does this work for you?
Comment 4 Dimitri van Heesch 2014-04-27 16:22:07 UTC
Thanks. I've reproduced and found the problem. Should be fixed in the next GIT update.
Comment 5 Dimitri van Heesch 2014-08-21 17:15:11 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.8. 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 (preferrably in the form of a self-contained example).