📜  警告:base 将在之后初始化 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.943000             🧑  作者: Mango

代码示例1
// Make sure the members appear in the initializer list in the same order as they appear in the class
Class C {
   int a;
   int b;
   C():b(1),a(2){} //warning, should be C():a(2),b(1)
}
// or you can turn -Wno-reorder