3.4 - [basic.lookup] - 【基本.查找】

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

3 Basic concepts [basic]

3.4 Name lookup [basic.lookup]

 

3 基本概念 【基本】

3.4 名字查找 【基本.查找】

 

The name lookup rules apply uniformly to all names (including typedef-names (7.1.3), namespace-names (7.3) and class-names (9.1)) wherever the grammar allows such names in the context 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 an unambiguous declaration for the name (see 10.2). Name lookup may associate more than one declaration with a name if it finds the name to be a function name; the declarations are said to form a set of overloaded functions (13.1). Overload resolution (13.3) takes place after name lookup has succeeded. The access rules (clause 11) are considered only once name lookup and function overload resolution (if applicable) have succeeded. Only after name lookup, function overload resolution (if applicable) and access checking have succeeded are the attributes introduced by the name's declaration used further in expression processing (clause 5).

 

无论语法对某条特定规则论述的语境中的名字允许出现在何处,名称查找规则统一地应用到所有名字上(包括 typedef-名称(7.1.3),名字空间-名称(7.3)和类-名称(9.1))。名字查找将名字的应用羽其名字的声明(3.1)联系起来。名字查找应该找到该名字的一个明确的声明(见 10.2)。名字查找如果发现名字为函数名字,可能将其联系到多于一个声明上;这些声明被认为构成一组重载函数(13.1)。重载解析(13.3)在名字查找成功之后进行。访问规则(章节 11)仅当名字查找和函数重载解析(如果适用)成功后被考虑,仅在名字查找,函数重载解析(如果适用)和访问检查成功后,由该名字的声明引入的属性才被表达式处理(章节 5)中进一步使用。

 

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

 

在“表达式的语境中查找”的名字是被出现该表达式的作用域中作为非限定名称查找的。

 

Because the name of a class is inserted in its 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.

 

由于类的名称是被插入到其类作用域(章节 9)中,所以处理名字隐藏和查找时,类的名字同样被看作该类的成员。

 

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

 

注:3.5 讨论连接性的问题。作用域,声明点和名字隐藏的概念在 3.3 中讨论。】

 

3.4.1 Unqualified name lookup [basic.lookup.unqual]

 

3.4.1 非限定名称查找 【基本.查找.非限定】

 

3.4.2 Argument-dependent name lookup [basic.lookup.koenig]

 

3.4.2 自变量关联名称查找 【基本.查找.koenig】

 

3.4.3 Qualified name lookup [basic.lookup.qual]

 

3.4.3 限定名称查找 【基本.查找.限定】

 

3.4.4 Elaborated type specifiers [basic.lookup.elab]

 

3.4.4 详细类型限定 【基本.查找.详细】

 

3.4.5 Class member access [basic.lookup.classref]

 

3.4.5 类成员访问 【基本.查找.类参照】

 

3.4.6 Using-directives and namespace aliases [basic.lookup.udir]

 

3.4.6 Using-指令和名字空间别名 【基本.查找.u指令】

 

PREV [basic.scope.hiding] | NEXT [basic.lookup.unqual]上一页 【基本.作用域.隐藏】 | 下一页 【基本.查找.非限定】
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
dial tcp:lookup registry-1.docker.io 这个错误通常表示的是访问注册表(Registry) 时出现了连接问题或者 DNS 解析问题。Docker 是一种开源的容器化引擎,它可以在 Linux、Windows 和 macOS 等不同的操作系统上运行,能够将应用程序及其依赖打包成可移植的容器来简化应用部署。Docker 中的镜像(Image) 是容器的基础模板,其存储在 Docker 的注册表中,当运行一个容器时,Docker 引擎会自动从注册表下载相应的镜像。所以如果出现了 dial tcp:lookup registry-1.docker.io 错误,那么我们无法下载镜像,也就无法运行容器。 造成 dial tcp:lookup registry-1.docker.io 错误的原因可能有很多,可能是网络不稳定、DNS 解析问题、代理问题以及操作系统配置等。解决这种错误的方法也有很多,可以尝试更改 DNS 解析设置、切换到稳定的网络,或者禁用代理等措施。一些解决方法如下: 1. 修改 DNS 设置。一些情况下 DNS 缓存造成了问题,需清除 DNS 缓存,重新解析。另外,有时候也可以修改本地的 DNS 设置,在/etc/resolv.conf 文件中添加 Google 的 DNS 8.8.8.8 即可。命令为: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null 2. 检查网络连接。首先确定本地的网络连接是否正常。可以使用 ping 命令检测 DNS 是否正常解析,然后再尝试连接 Docker 服务器。如果是代理的问题,尝试关闭代理,再重试一下。 3. 更新操作系统。检查操作系统是否需要更新,特别是针对网络连接方面。 4. 更换 Docker 镜像源。由于网络原因,国内镜像源可能无法正常访问,所以可以尝试更改 Docker 镜像源为国外的源,比如 Docker 官方的镜像源等。 总之,如何解决 dial tcp:lookup registry-1.docker.io 错误是需要具体情况具体分析,解决方法也可能因具体情况而异,需要根据错误提示和具体问题来进行判断和解决。

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

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值