静态变量不应在类中初始化的推理/逻辑是什么? (为了初始化它,我们也必须将它声明为 const)。如果这是可能的,那会有什么问题?
示例:这是不可能的
struct foo { static int value = 3; };
但这是:
struct foo { static const int value = 3; };