nguage/access")  
[ Constructors and member initializer lists ](/w/cpp/language/constructor
"cpp/language/constructor")  
[ Default member initializer
](/w/cpp/language/data_members#Member_initialization "cpp/language/data
members") (C++11)  
[ ` friend ` specifier ](/w/cpp/language/friend "cpp/language/friend")  
[ ` explicit ` specifier ](/w/cpp/language/explicit "cpp/language/explicit")  
[ Converting constructor ](/w/cpp/language/converting_constructor
"cpp/language/converting constructor")  
Special member functions  
[ Default constructor ](/w/cpp/language/default_constructor
"cpp/language/default constructor")  
[ Copy constructor ](/w/cpp/language/copy_constructor "cpp/language/copy
constructor")  
[ Move constructor ](/w/cpp/language/move_constructor "cpp/language/move
constructor") (C++11)  
[ Copy assignment operator ](/w/cpp/language/copy_assignment
"cpp/language/copy assignment")  
[ Move assignment operator ](/w/cpp/language/move_assignment
"cpp/language/move assignment") (C++11)  
[ Destructor ](/w/cpp/language/destructor "cpp/language/destructor")  
Inheritance  
[ Base and derived classes ](/w/cpp/language/derived_class
"cpp/language/derived class")  
[ Empty base optimization (EBO) ](/w/cpp/language/ebo "cpp/language/ebo")  
[ Virtual member functions ](/w/cpp/language/virtual "cpp/language/virtual")  
[ Pure virtual functions and abstract classes ](/w/cpp/language/abstract_class
"cpp/language/abstract class")  
[ ` override ` specifier ](/w/cpp/language/override "cpp/language/override")
(C++11)  
[ ` final ` specifier ](/w/cpp/language/final "cpp/language/final") (C++11)  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/language/classes/navbar_content&action=edit)

Introduces a name that is defined elsewhere into the declarative region where
this using-declaration appears. See  [ using enum
](/w/cpp/language/enum#Using-enum-declaration "cpp/language/enum") and  (since
C++20)  [ using namespace ](/w/cpp/language/namespace#Using-directives
"cpp/language/namespace") for other related declarations.  
  
---  
` **using** ` ` **typename** ` (optional)  nested-name-specifier  unqualified-id  ` **;** ` |  |  (until C++17)   
` **using** ` declarator-list  ` **;** ` |  |  (since C++17)   
` **typename** ` |  \-  |  the keyword  typename  may be used as necessary to resolve [ dependent names ](/w/cpp/language/dependent_name "cpp/language/dependent name") , when the using-declaration introduces a member type from a base class into a class template   
---|---|---  
nested-name-specifier  |  \-  |  a sequence of names and scope resolution operators ` :: ` , ending with a scope resolution operator. A single ` :: ` refers to the global namespace.   
unqualified-id  |  \-  |  an [ id-expression ](/w/cpp/language/identifiers "cpp/language/identifiers")  
declarator-list  |  \-  |  comma-separated list of one or more declarators of the ` **typename** ` (optional)  nested-name-specifier  unqualified-id  . Some or all of the declarators may be followed by an ellipsis  ...  to indicate [ pack expansion ](/w/cpp/language/parameter_pack "cpp/language/parameter pack")  
  
##  Contents

  * 1  Explanation 
    * 1.1  In namespace and block scope 
    * 1.2  In class definition 
    * 1.3  Inheriting constructors 
    * 1.4  Introducing scoped enumerators 
  * 2  Notes 
  * 3  Defect reports 

  
---  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/language/using_declaration&action=edit&section=1
"Edit section: Explanation") ]  Explanation

Using-declarations can be used to introduce namespace members into other
namespaces and block scopes, or to introduce base class members into derived
class definitions  , or to introduce [ enumerators ](/w/cpp/language/enum
"cpp/language/enum") into namespaces, block, and class scopes  (since C++20)
.

A using-declaration with more than one using-declarator is equivalent to a corresponding sequence of using-declarations with one using-declarator.  |  (since C++17)