| Start |
|---|
| Importing names individually from a namespace Once |
| Redeclaring members from a base class to avoid name hiding If a using-declaration occurs at class scope, it is only allowed to redeclare a member of a base class. For example, Often, the name redeclared is one that would otherwise be hidden. For example, in the below code, |
| Inheriting constructors As a special case, a using-declaration at class scope can refer to the constructors of a direct base class. Those constructors are then inherited by the derived class and can be used to initialize the derived class. In the above code, both Syntax
RemarksA using-declaration is distinct from a using directive (opens new window), which tells the compiler to look in a particular namespace when looking up any name. A using-directive begins with A using-declaration is also distinct from an alias declaration, which gives a new name to an existing type in the same manner as |
Read Article
https://develop.horje.com/learn/1434/reference