我在没有代码或上下文的情况下多次遇到术语类静态对象,以澄清这是作者对我不知道的东西的术语还是只是类(范围)静态成员(变量或函数)的另一个术语.
class m1 {
public:
static int x;
};
// with x being the "class static "object"
// which I just call a "class static member".
int m1::x;
或者,该术语是否仅适用于实际上是用户定义对象的成员变量?
class m2 {
public:
int y;
};
class m3 {
public:
static m2 z;
};
// with z really being an object - the "class static object"?
m2 m3::z;