New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"single search" is confusingly ambiguous #4629
Comments
@opensdh, any thoughts here? |
I’m the one who suggested filing the issue, but I don’t have much of an opinion: whether enough people are confused by it to make it worth changing is an empirical matter. Nor am I sure about “direct search”, since “direct” sounds a bit like an intensifier rather than a restriction, although the parallel with members could be helpful. |
The meaning of the phrase "single search" might be read out from the following rule:
In my opinion, the purpose of defining "single search" is almost used to state how to search the namespace's scope, which is different from the scope of a class, the latter should undergo a search in its base classes if the declarations are not yet found. |
Well, in truth it's unambiguous that [basic.lookup.general]/3 defines "single search" (per the index and everything). The question is not what defines it, but how to clarify this situation. |
I also think we should clarify what the
Frankly, I am not understanding this bullet. Does it try to construct a hypothetical name |
This bit about [class.member.lookup]/7 seems like a very separate issue. Yes, t is a hypothetical name; F is clearly one of the conversion function templates being considered. |
The bullet says conversion function templates that are members of T are considered." and [class.derived#general-2] says
That means the set of this consideration only contains "conversion function templates" from T and its base classes and of one of them. We get two pieces of information here, the set only contains "conversion function templates" and they are all from T or its base classes. Every template F in this set certainly does correspond to itself, so, I don't know what's the necessity of this condition here. |
Folks, can you please discuss that in a separate issue, the reflector or std-discussion. I feel like this is absolutely the wrong place. |
Sorry about the derailment! We definitely appreciate the issue, and welcome a concrete rewording suggestion! Maybe we can find new terms for the current "search" and "single search" that are not overlapping in this confusing way. |
I was reading the name lookup rewrite and initially was confused by reading that "a search" was defined to be something different than "a single search", until I found out that "single search" has its own definition, rather than being one quantity of search.
I recommend a different term. For class members, we have "direct member" and "member" (which includes inherited members). Similarly, "direct search" can be defined to only operate on the class's own scope, whereas a "search" will not.
This will also help to reduce ambiguities, when text wants to refer to one quantity of searches (maybe among multiple searches from different program points) as a "single search".
The text was updated successfully, but these errors were encountered: