[英]I'd like to see one example where the conversion-type-id is looked up in the context of the entire postfix-expression
In [basic.lookup.classref]/7 (C++14) we have (emphasis is mine): 在[basic.lookup.classref] / 7(C ++ 14)中我们有(重点是我的):
If the id-expression is a conversion-function-id , its conversion-type-id is first looked up in the class of the object expression and the name, if found, is used.
如果id-expression是conversion-function-id ,则首先在对象表达式的类中查找其conversion-type-id ,并使用名称(如果找到)。 Otherwise it is looked up in the context of the entire postfix-expression .
否则,它将在整个postfix-expression的上下文中查找。 In each of these lookups, only names that denote types or templates whose specializations are types are considered.
在每个查找中,仅考虑表示其特化类型的类型或模板的名称。
I don't understand the need for the Otherwise above. 我不明白上面的其他需要。 Therefore, I'd like to see an example, where the conversion-type-id is looked up in the context of the entire postfix-expression.
因此,我想看一个示例,其中在整个postfix-expression的上下文中查找conversion-type-id 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.