gpt4 book ai didi

c++ - 来自 ISO C++ draft (n3290) : 3. 4.3.2/2 命名空间成员的一点

转载 作者:太空狗 更新时间:2023-10-29 21:50:03 25 4
gpt4 key购买 nike

来自 ISO C++ 草案 (n3290) 的一点:3.4.3.2/1 命名空间成员

For a namespace X and name m, the namespace-qualified lookup set S(X, m) is defined as follows: Let S`(X, m) be the set of all declarations of m in X and the inline namespace set of X (7.3.1). If S`(X, m) is not empty, S(X, m) is S`(X, m); otherwise, S(X, m) is the union of S(N_i, m) for all namespaces N_i nominated by using-directives in X and its inline namespace set.

有人可以用通俗易懂的英语向我解释这个子句吗?

编辑:请............任何人都可以给我一个例子..解释以上几点......请......

最佳答案

如果在命名空间X 中,至少存在一个名为m 的声明,那么这些声明将用于查找集。

否则,所有来自 using 命名空间 X 中指令的命名空间都将以与上述相同的方式检查名称 m 的声明.

或者换句话说:你检查命名空间 X 和它的 using 指令递归地寻找名称 m,并在找到名称 m 的声明的级别。

关于c++ - 来自 ISO C++ draft (n3290) : 3. 4.3.2/2 命名空间成员的一点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7006968/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com