eclipse cdt不喜欢类成员初始化器

时间:2012-11-16 14:39:41

标签: c++ c++11 eclipse-cdt

我正在使用eclipse CDT 8.1.1

问题在于,当使用C ++ 11类成员初始值设定项时,它会抱怨成员未初始化。 它仍然期待一个初始化列表。

class Foo {
public:
  Foo() {} // warning: Member `m_bar` was not initialized in this constructor
 private:
  int m_bar = 0;
};

我能做些什么吗?

0 个答案:

没有答案