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 721462 - Parsing problem with C++11 empty initializer lists
Parsing problem with C++11 empty initializer lists
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: documentation
1.8.5
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-01-04 16:19 UTC by andras.vukics
Modified: 2014-04-21 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description andras.vukics 2014-01-04 16:19:45 UTC
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<double> DoublesInitializer;
  typedef std::initializer_list<int   >    IntsInitializer;

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

private:
  const std::list<double> d_;
  const std::list<int   > 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<int>. Doxygen also believes to find „Initial value” for i, which is

{}

private:
  const std::list<double> 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<double> DoublesInitializer;
  typedef std::initializer_list<int   >    IntsInitializer;

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

private:
  const std::list<double> d_;
  const std::list<int   > i_;
};
Comment 1 Dimitri van Heesch 2014-01-08 11:48:50 UTC
Confirmed. Should be fixed in the next GIT update.
Comment 2 Dimitri van Heesch 2014-04-21 10:09:28 UTC
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).