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

Parsing problem with C++11 empty initializer lists (Origin: bugzilla #721462) #5390

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 documentation for ---
Reported in version 1.8.5 on platform Other
Assigned to: Dimitri van Heesch

On 2014-01-04 16:19:45 +0000, andras.vukics@gmail.com wrote:

C++11 empty initializer lists seem to cause a parsing problem. Consider:

// not parsed correctly by doxygen 1.8.5
class X
{
public:
typedef std::initializer_list DoublesInitializer;
typedef std::initializer_list IntsInitializer;

X(DoublesInitializer d, IntsInitializer i={}) : d_(d), i_(i) {}
X(IntsInitializer i) : X({},i) {}

private:
const std::list d_;
const std::list i_;
};

In the Doxygen html output there appear superfluous �Public Attributes� i and i_, the first without a type, and the second with type const std::list. Doxygen also believes to find �Initial value� for i, which is

{}

private:
const std::list d_

It turns out that the second constructor is the problematic one, since this works correctly:

// parsed correctly by doxygen 1.8.5
class Y
{
public:
typedef std::initializer_list DoublesInitializer;
typedef std::initializer_list IntsInitializer;

Y(DoublesInitializer d, IntsInitializer i={}) : d_(d), i_(i) {}
Y(IntsInitializer i) : Y(DoublesInitializer(),i) {}

private:
const std::list d_;
const std::list i_;
};

On 2014-01-08 11:48:50 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next GIT update.

On 2014-04-21 10:09:28 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.7. 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