你能让一个未命名的结构成为一个类的静态成员吗?
struct Foo
{
struct namedStruct
{
int memb1, memb2;
};
static namedStruct namedStructObj;
struct
{
int memb1, memb2;
} unnamedStructObj;
};
Foo::namedStruct Foo::namedStructObj;
// The unnamed type doesn't seem to have a type you can write