I am using Doxygen 1.8.5 from ARCH/extra, and the problem seems to still exist when it comes to empty initializer lists. 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_;
};
This is valid C++11 code, but in the Doxygen html output the 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_;
};
If this is indeed a bug, I will re-open #688647.