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

[basic.scope] What is type equivalence? #6491

Open
Eisenwave opened this issue Aug 21, 2023 · 8 comments · May be fixed by #6549
Open

[basic.scope] What is type equivalence? #6491

Eisenwave opened this issue Aug 21, 2023 · 8 comments · May be fixed by #6549

Comments

@Eisenwave
Copy link
Contributor

[basic.scope] p3 refers to same types in one definition, and equivalent types in another.

When are two types considered equivalent, and what is the difference between that and them being the same type? There should be a forward-reference to the relevant section, and I was unable to find it.

@Eisenwave
Copy link
Contributor Author

Eisenwave commented Aug 21, 2023

I think this might refer to [temp.over.link] p5, and what is really meant is that the expressions denoting the parameter types are equivalent.

@Eisenwave
Copy link
Contributor Author

It's worth noting that the next paragraph already forward-references [temp.over.link], so adding another reference seems obviously correct.

@JohelEGP
Copy link
Contributor

JohelEGP commented Sep 2, 2023

AFAIK, the convention is that, within a subclause, a reference to a term appears only once.
So you might want to move the reference to the earliest appearance of the term within the subclause.

@Eelis
Copy link
Contributor

Eelis commented Sep 4, 2023

Seems related to #1475.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2023

@JohelEGP Where are you getting this convention from? I don't think this is an ISO rule, and I also don't recall us having such a general preference. I couldn't find anything in the wiki, either. Has this come up before?

@JohelEGP
Copy link
Contributor

Nothing explicitly stated in any guideline,
although I remember @jensmaurer calling it out before when someone repeats a reference.
I'd have to find such a comment.
But you can also see that subclauses typically don't repeat a reference twice.

@jensmaurer
Copy link
Member

@tkoeppe In general, having the same cross-reference repeated in close proximity is something CWG has avoided in the past. I wouldn't go as far and say "one xref per subclause", but duplicating xrefs in a single paragraph certainly crosses the line. There's a judgment call for the grey area in between.

For "consecutive paragraphs structured the same", I'd say an xref for the first such paragraph is enough.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2023

I'd judge it by whether the cross reference is useful. If a subclause has 12 paragraphs and p1 and p12 refer to the same remote rule in different contexts, I'd consider whether a reference in both paragraphs is help for each one.

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

Successfully merging a pull request may close this issue.

5 participants