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] Fix example #3935

Merged
merged 1 commit into from Sep 18, 2020
Merged

[temp.over] Fix example #3935

merged 1 commit into from Sep 18, 2020

Conversation

languagelawyer
Copy link
Contributor

@languagelawyer languagelawyer commented Apr 12, 2020

[temp.pre]/10:
"""
A definition of a function template ... shall be reachable from the end of every definition domain ([basic.def.odr]) in which it is implicitly instantiated ([temp.inst]) unless the corresponding specialization is explicitly instantiated ([temp.explicit]) in some translation unit; no diagnostic is required.
"""

So, implicit instantiation (or explicit specialization) won't make the example well-formed.

@languagelawyer
Copy link
Contributor Author

Some historic context: the requirement for template explicit instantiation existence was added in the resolution of CWG323 in 2002 whilst the example was added in Sep 1994 WP and has its current shape since Jun 1996 WP.

source/templates.tex Outdated Show resolved Hide resolved
Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small drive-by, please

@languagelawyer
Copy link
Contributor Author

@jensmaurer could you re-review plz?

@zygoloid zygoloid merged commit 6ea1fa4 into cplusplus:master Sep 18, 2020
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 this pull request may close these issues.

None yet

3 participants