GNOME Bugzilla – Bug 729017
function object in member initializer causes documentation loss
Last modified: 2014-08-21 17:15:11 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.
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; })
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.
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?
Thanks. I've reproduced and found the problem. Should be fixed in the next GIT update.
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).