New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function object in member initializer causes documentation loss (Origin: bugzilla #729017) #5461

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.7-GIT on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2014-04-26 15:06:18 +0000, Peter A. Bigot wrote:

Created attachment 275210
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.

On 2014-04-27 14:40:07 +0000, Dimitri van Heesch wrote:

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 '' to 'put_fn_type'
(aka 'void (*)(char)')
putter_([this](char c) { (void)c; })

On 2014-04-27 15:39:31 +0000, Peter A. Bigot wrote:

Created attachment 275269
compilable reproducer

Use include "test.h" in otherwise empty test.c. g++ -std=c++11 -c with gcc 4.9.0 will compile this.

On 2014-04-27 15:40:00 +0000, Peter A. Bigot wrote:

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?

On 2014-04-27 16:22:07 +0000, Dimitri van Heesch wrote:

Thanks. I've reproduced and found the problem. Should be fixed in the next GIT update.

On 2014-08-21 17:15:11 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment