tailieunhanh - ansi C reference phần 5

id-biểu hiện: đủ điều kiện không đủ tiêu chuẩn-id-id lồng nhau-tên xác định: lớp hoặc tên miền không gian tên:: lồng nhau-tên-specifieropt lớp hoặc tên miền không gian tên: class-name tên miền không gian tên tên miền không gian tên: ban đầu không gian tên, tên miền không gian-alias 2 3 | Explicit qualification DRAFT 28 April 1995 Declarations 7-15 id-expression unqualified-id qualified-id nested-name-specifier class-or-namespace-name nested-name-specifieropt class-or-namespace-name class-name namespace-name namespace-name original-namespace-name namespace-alias 2 The namespace-names in a nested-name-specifier shall have been previously defined by a named-namespace-definition or a namespace-alias-definition. 3 The search for the initial qualifier preceding any operator locates only the names of types or namespaces. The search for a name after a locates only named members of a namespace or class. In particular using-directives are ignored as is any enclosing declarative region. Unnamed namespaces 1 An unnamed-namespace-definition behaves as if it were replaced by namespace unique namespace-body using namespace unique where for each translation unit all occurrences of unique in that translation unit are replaced by an identifier that differs from all other identifiers in the entire Example namespace int i void f i namespace A namespace int i int j void g i using namespace A void h i A i j end example unique i unique i A unique i A unique j A unique i error unique i or A unique i error A i undefined A unique j Namespace scope 1 The declarative region of a namespace-definition is its namespace-body. The potential scope denoted by an original-namespace-name is the concatenation of the declarative regions established by each of the namespace-definitions in the same declarative region with that original-namespace-name. Entities declared in a namespace-body are said to be members of the namespace and names introduced by these declarations 54 Although entities in an unnamed namespace might have external linkage they are effectively qualified by a name unique to their translation unit and therefore can never be seen from any other translation unit. 7-16 Declarations DRAFT 28 April 1995

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.