开发者

What does static mean when applied to a class at namespace scope?

I know that static at namespace scope means "internal linkage". Now 开发者_运维问答consider the following code:

static class Foo {} foo;

Does the static apply to Foo, foo or both?


It applies to the variable declared after the class definition.

In C++, there is no such thing as static class. There are only static objects and static functions.


class Foo {} states type of foo variable. static makes foo static.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜