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

[temp.over.link] Remove (apparent) copy/paste extra lines from example code #4396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cuzdav
Copy link

@cuzdav cuzdav commented Nov 28, 2020

The first two lines in this example were an exact copy from the
previous example (about 40 lines up), and seem unrelated to the
topic being demonstrated, so look like a cut/paste error.

The first two lines in this example were an exact copy from the
previous example, and seem unrelated to the topic being demonstrated.
@cpplearner
Copy link
Contributor

The example demonstrates that

Two expressions involving template parameters are considered equivalent if two function definitions containing the expressions would satisfy the one-definition rule, except that the tokens used to name the template parameters may differ as long as a token used to name a template parameter in one expression is replaced by another token that names the same template parameter in the other expression.

I don't think it's an error.

@cuzdav
Copy link
Author

cuzdav commented Nov 29, 2020

It seems to me you're taking the text describing example 2, while my proposed change is for example 3 (which is about dependent names). Both examples 2 and 3 contain these exact same lines, and it is correct in example 2, but appears to be copy-paste leftover in example 3.

For determining whether two dependent names\iref{temp.dep} are
equivalent, only the name itself is considered, not the result of name
lookup in the context of the template. If multiple declarations of the
same function template differ in the result of this name lookup, the
result for the first declaration is used.

@cuzdav cuzdav changed the title Remove copy/paste extra lines from example code [temp.over.link] Remove (apparent) copy/paste extra lines from example code Dec 14, 2020
@tkoeppe
Copy link
Contributor

tkoeppe commented May 29, 2021

@jensmaurer, @opensdh: could you kindly take a look? The original wording seems to have been in place since the initial commit.

@jensmaurer
Copy link
Member

jensmaurer commented May 29, 2021

I agree this repeats parts of the earlier example, but it seems as relevant to the given paragraph ("equivalent") as to the previous one. Maybe the second line of the previous example should actually be removed, because the paragraph specifies that dependent expressions are part of the signature (difference between + and - in the return type), not that template parameter renames are benign.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label May 30, 2021
@opensdh
Copy link
Contributor

opensdh commented Jun 10, 2021

It's not actually "an exact copy from the previous example": it uses a parameter type instead of a return type. I tend to agree with @jensmaurer that removing the one line from the previous example is a more useful simplification.

@cuzdav
Copy link
Author

cuzdav commented Jun 10, 2021 via email

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 25, 2021

@cuzdav: could you make the suggested change, or would you like me to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants