3.4-[Basic.lookup]-"Basic. Find"

Source: Internet
Author: User
Please do not reprint this article, please do not re-publish in any form, publish this article, please delete it within 24 hours of downloading this article, prohibit the use of this article for commercial purposes.
3 Basic Concepts [basic] 3.4 Name Lookup [Basic.lookup]

 

3 Basic Concept "basic" 3.4 Names find "Basic. Find"

 

The name lookup rules apply uniformly to all names (including Typedef-names (7.1.3), Namespace-names (7.3) and Class-n Ames (9.1)) wherever the grammar allows such names in the context of discussed by a particular rule. Name Lookup associates the use of a name with a declaration (3.1) of that name. Name lookup shall find a unambiguous declaration for the name (see 10.2). Name Lookup may associate more than one declaration with a name if it finds the name of be a function name; The declarations is said to form a set of overloaded functions (13.1). Overload resolution (13.3) takes place after name lookup have succeeded. The access rules (clause) is considered only once name lookup and function overload resolution (if applicable) has SU Cceeded. Only after name lookup, function overload resolution (if applicable) and access checking has succeeded is the attributes Introduced by the name ' s declaration used further in expression processing (clause 5).

The name lookup rules apply uniformly to all names (including the typedef-name (7.1.3), namespace-name (7.3), and class-name (9.1)), regardless of where the name in the context in which the grammar is discussed in a particular rule is allowed to appear. The name lookup links the application of the name to the declaration of its name (3.1). The name lookup should find a clear statement of the name (see 10.2). Name Lookup If a name is found to be a function name, it may be linked to more than one declaration, which is considered to constitute a set of overloaded functions (13.1). Overload resolution (13.3) is performed after the name lookup succeeds. Access rules (section 11) are considered only if the name lookup and function overload resolution (if applicable) are successful, only after the name lookup, the function overload resolution (if applicable), and the access check succeeds, the property introduced by the name's declaration is further used in the Expression processing (section 5).

 

A name "looked up" of the context of an expression "was looked up as an unqualified name in the scope where the expression I s found.

 

The name of "Find in the context of an expression" is found in the scope of the expression that appears as an unqualified name.

 

Because the name of a class is inserted in it class scope (clause 9), the name of a class is also considered a member of That class for the purposes of name hiding and lookup.

 

Because the name of the class is inserted into its class scope (section 9), the name of the class is also treated as a member of the class when it handles the name hiding and finding.

 

[note:3.5 discusses linkage issues. The notions of scope, point of declaration and name hiding is discussed in 3.3. ]

 

Note: 3.5 discusses connectivity issues. The concept of scope, declaration point and name hiding is discussed in 3.3. 】

 

3.4.1 Unqualified name lookup [basic.lookup.unqual]

 

3.4.1 Unqualified Name Lookup "Basic. Find. Non-qualified"

 

3.4.2 argument-dependent name lookup [Basic.lookup.koenig]

 

3.4.2 Argument Association name Lookup "Basic. Find. Koenig"

 

3.4.3 qualified name lookup [Basic.lookup.qual]

 

3.4.3 qualified name lookup "Basic. Find. Qualification"

 

3.4.4 elaborated type specifiers [Basic.lookup.elab]

 

3.4.4 Detailed type qualification "basic. Find. More"

 

3.4.5 Class member access [BASIC.LOOKUP.CLASSREF]

 

3.4.5 class member access "Basic. Find. Class Reference"

 

3.4.6 using-directives and namespace aliases [Basic.lookup.udir]

 

3.4.6 using-directive and namespace alias "Basic. Find. U instructions"

 

PREV [basic.scope.hiding] | NEXT [Basic.lookup.unqual] Prev "Basic. Scope. Hide" | Next Page "Basic. Find. Non-qualified"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.