Skip to content
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

[over.over] p1 Eliminate the ambiguity in the sentence #6127

Open
xmh0511 opened this issue Feb 16, 2023 · 1 comment
Open

[over.over] p1 Eliminate the ambiguity in the sentence #6127

xmh0511 opened this issue Feb 16, 2023 · 1 comment

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Feb 16, 2023

An id-expression whose terminal name refers to an overload set S and that appears without arguments is resolved to a function, a pointer to function, or a pointer to member function for a specific function that is chosen from a set of functions selected from S determined based on the target type required in the context (if any), as described below.

Emphasis mine, whether it means:

  1. S is determined based on the target type, or
  2. a set of functions is determined based on the target type.

? Although, S seems to only rely on the result of the name lookup. However, the sentence requires us to check other subclauses t o determine what the intent actually means.

Is it an improvement?

An id-expression whose terminal name refers to an overload set S and that appears without arguments is resolved to a function, a pointer to function, or a pointer to member function for a specific function that is chosen from S'(a set of functions) selected from S, where S' is determined based on the target type required in the context (if any) as described below.

@jwakely
Copy link
Member

jwakely commented Feb 16, 2023

However, the sentence requires us to check other subclauses t o determine what the intent actually means.

I don't think that's true. If the intended meaning was that S was determined based on the target type, it would have said that when S was first mentioned at the start of the sentence. It doesn't make sense to define S when referring to it instead of when introducing it. There's simply no way it would be written like that if reading 1 was intended.

And apart from that, it says S is an overload set. I don't think it's unreasonable to expect you to interpret the sentence in the context of what an overload set is, and an overload set does not have a target type.

That sentence is much too long though, so it would be nice to rephrase it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants