# 3 - [basic] - 【基本】

59 篇文章 1 订阅

## 3 基本概念 【基本】

[Note: this clause presents the basic concepts of the C++ language. It explains the difference between an object and a name and how they relate to the notion of an lvalue. It introduces the concepts of a declaration and a definition and presents C++'s notion of type, scope, linkage, and storage duration. The mechanisms for starting and terminating a program are discussed. Finally, this clause presents the fundamental types of the language and lists the ways of constructing compound types from these.

This clause does not cover concepts that affect only a single part of the language. Such concepts are discussed in the relevant clauses. ]

An entity is a value, object, subobject, base class subobject, array element, variable, function, instance of a function, enumerator, type, class member, template, or namespace.

A name is a use of an identifier (2.10) that denotes an entity or label (6.6.4, 6.1). A variable is introduced by the declaration of an object. The variable's name denotes the object.

Every name that denotes an entity is introduced by a declaration. Every name that denotes a label is introduced either by a goto statement (6.6.4) or a labeled-statement (6.1).

some names denote types, classes, enumerations, or templates. In general, it is necessary to determine whether or not a name denotes one of these entities before parsing the program that contains it. The process that determines this is called name lookup (3.4).

Two names are the same if
• they are identifiers composed of the same character sequence; or
• they are the names of overloaded operator functions formed with the same operator; or
• they are the names of user-defined conversion functions formed with the same type.

• 它们是由相同的字符序列组成的标识符；或
• 它们是形成相同运算符的运算符重载函数名字；或
• 它们是形成相同类型的用户定义转换函数。

An identifier used in more than one translation unit can potentially refer to the same entity in these translation units depending on the linkage (3.5) of the identifier specified in each translation unit.

#### 3.10 左值和右值 【基本.左值】

PREV [lex.bool] | NEXT [basic.def]上一页 【词法.布尔】 | 下一页 【基本.定义】
• 0
点赞
• 0
收藏
• 打赏
• 0
评论
07-19 1326
07-18 7753

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

lynnboy

¥2 ¥4 ¥6 ¥10 ¥20

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。