Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I ignore the gcc warning: ‘Foo::m_bar’ should be initialized in the member initialization list [-Weffc++]

Tags:

struct Bar {     Bar() {} };   struct Foo {     Foo() = default;     Bar m_bar; };  int main() {     Foo foo; } 

When using C++11 default keyword and gcc warning -Weffc++, gcc outputs:

warning: ‘Foo::m_bar’ should be initialized in the member initialization list [-Weffc++]

Is it safe to ignore this warning? Should I file a bug to gcc?