My house is selling. I don't know when can be sold. By the way, if I go back to Wuhan, I will have to find
a new job.
Suddenly, I am aware to go back home is not easy. I must be waiting, waiting a chance.
Unnamed Namespaces
You can create an unnamed namespace by omitting the namespace name:
namespace // unnamed namespace
{
int ice;
int bandycoot;
}
This behaves as if it were followed by a using-directive; that is, the names declared in this namespace are in
potential scope until the end of the declarative region containing the unnamed namespace. In this respect, they
are like global variables. However, because the namespace has no name, you can't explicitly use a using-directive
or using-declaration to make the names available elsewhere. In particular, you can't use names from an unnamed
namespace in a file other than the one containing the namespace declaration. This provides an alternative to using
static variables with internal linkage. Indeed, the C++ standard deprecates the use of the keyword static in namespaces
and global scope. ("Deprecate" is a term the standard uses to indicate practices that currently are valid but most
likely will be rendered invalid by future revisions of the standard.)
2008 May 5th Monday (五月 五日 月曜日)
最新推荐文章于 2022-03-23 22:45:20 发布