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.inst] Specializations can be implicitly instantiated infinitely #2893

Open
sdkrystian opened this issue May 24, 2019 · 1 comment
Open
Labels
cwg Issue must be reviewed by CWG.

Comments

@sdkrystian
Copy link
Contributor

This is really on the edge of being editorial, but I think it still qualifies.

According to the wording in [temp.inst], a specialization of a template is instantiated when it is not explicitly specialized and not explicitly instantiated. However, there is no mention of what will happen if the specialization has already been implicitly instantiated, which according to the wording would be implicitly instantiated again. I do not believe that this is the intended effect, since it allows multiple definitions of a specialization to be generated in a single translation unit.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 28, 2019
@jensmaurer
Copy link
Member

jensmaurer commented Jul 16, 2019

Editorial meeting: temp.inst p1 etc. change "when" to "if" (not temporal), but it seems we need a bigger-picture look: The instantiation unit model is not suitable when needing to instantiate a template because it participates in a function return type (etc); you need the answer right then and there, not when forming the instantiation unit after having parsed the entire file.

@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. and removed decision-required A decision of the editorial group (or the Project Editor) is required. labels Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

No branches or pull requests

2 participants