GNOME Bugzilla – Bug 721462
Parsing problem with C++11 empty initializer lists
Last modified: 2014-04-21 10:09:28 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_; };
Confirmed. 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.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).