Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| c_namespaces [2018/02/01 13:48] – [Terminology] rpjday | c_namespaces [2018/02/01 14:50] (current) – [using-Directives] rpjday | ||
|---|---|---|---|
| Line 40: | Line 40: | ||
| namespace ATT = American_Telephone_and_Telegraph; | namespace ATT = American_Telephone_and_Telegraph; | ||
| - | </ | + | </ |
| - | Also, "... either a previously unused identifier, in which case this is // | + | Also, namespace identifier is "... either a previously unused identifier, in which case this is // |
| ===== Extensibility (namespaces are " | ===== Extensibility (namespaces are " | ||
| Line 72: | Line 72: | ||
| ==== using-Declarations ==== | ==== using-Declarations ==== | ||
| + | |||
| + | Read [[http:// | ||
| "makes the symbol name from the namespace ns_name accessible for unqualified lookup as if declared in the same class scope, block scope, or namespace as where this using-declaration appears." | "makes the symbol name from the namespace ns_name accessible for unqualified lookup as if declared in the same class scope, block scope, or namespace as where this using-declaration appears." | ||
| Line 93: | Line 95: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | Useful for introducing base class members into derived class definitions. | ||
| ==== using-Directives ==== | ==== using-Directives ==== | ||
| + | |||
| + | cppreference.com link [[http:// | ||
| "From the point of view of unqualified name lookup of any name after a using-directive and until the end of the scope in which it appears, every name from ns_name is visible as if it were declared in the nearest enclosing namespace which contains both the using-directive and ns_name." | "From the point of view of unqualified name lookup of any name after a using-directive and until the end of the scope in which it appears, every name from ns_name is visible as if it were declared in the nearest enclosing namespace which contains both the using-directive and ns_name." | ||