Topic: static class names
Author: cok@acadia.Kodak.COM (David Cok)
Date: Thu, 24 Jun 93 14:16:30 GMT Raw View
As has been pointed out, the one-definition-rule means that a class name is
effectively global, even though it must be defined again in each
translation unit that uses it.
The intent of the request for a static class name as I understand it is to
allow a class name to be limited to one translation unit only, and if the
same name is used ("statically") in another translation unit, it would refer
to a different class.
If the current namespace proposal is adopted, the anonymous namespace feature
will provide a nice way to have local (to the translation unit) class names,
or any other names for that matter. In fact, as is pointed out in the
proposal, the use of "static" for this purpose could be deprecated.
David R. Cok