Using directives facilitate the use of namespaces and types defined in other namespaces. Using directives impact the name resolution process of namespace-or-type-names (§3.8) and simple-names (§7.6.2), but unlike declarations, using directives do not contribute new members to the underlying declaration spaces of the compilation units or namespaces within which they are used.
using-directives:
using-directive
using-directives using-directive
using-directive:
using-alias-directive
using-namespace-directive
A using-alias-directive (§9.4.1) introduces an alias for a namespace or type.
A using-namespace-directive (§9.4.2) imports the type members of a namespace.
The scope of a using-directive extends over the namespace-member-declarations of its immediately containing compilation unit or namespace body. The scope of a using-directive specifically does not include its peer using-directives. Thus, peer using-directives do not affect each other, and the order in which they are written is insignificant.
Do'stlaringiz bilan baham: |