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.spec]/2 dead wording #2666
Conversation
You having grep-ed long enough :) See for example. http://eel.is/c++draft/temp#inst-11.sentence-1 Also a lot of places use "instantiation", "instantiated" so it's not like those terms are no longer needed. Also there is a whole clause for instantations [temp.spec]. I don't think the term is as dead as you think it is :) |
@Rakete1111 In your example you provide, the term "instantiated class" is not used. In that sentence, instantiated is part of the word "implicitly instantiated", not "instantiated class/function...". The sentence would be read like this: " Implicitly instantiated (class, function, and variable template specializations) are placed in the namespace where the template is defined. The sentence is referring to implicitly instantiated specializations, not instantiated classes or functions. |
Ah right, that was a bad example, my bad. Here's one (http://eel.is/c++draft/temp.spec#4.sentence-2):
[unrelated: seems to be missing an enumeration and a variable here] I don't know if we should drop the term however since we're not really using it, as you say. |
@Rakete1111 Again, in your example there is no instance of the terms "instantiated class, instantiated function, instantiated member class..." being used. I'm am not proposing to remove the use of the word "instantiated" or "instantiation", I am proposing to remove "instantiated class/function" and family, as they are never used anywhere outside of the definition. |
I would argue that a "class that is instantiated" does indeed use the definition you are trying to remove. Where else is that property defined; did I miss something? |
@Rakete1111 The definition of specialization specifies that the class/function in question is in a state, either instantiated or explicitly specialized. The process of instantiation is described in http://eel.is/c++draft/temp.spec#1. |
The comments in the example in [temp.explicit] p5 seem to use the term "instantiated variable". Let's note make the proposed change. |
@jensmaurer There still is the issue of the paragraph cited here (more specifically the phrase "a function instantiated from a function template is called a instantiated function") being the the exact definition used for a function specialization http://eel.is/c++draft/temp#fct.spec-1.sentence-1 After another review, the comment seems to be the only place where one of the terms defined are used. Changing the comment, and removing the unnecessary wording would be the best course of action, as these terms are not used anywhere, and there is already another better definition that is used more commonly (specialization). |
The terms defined in [temp.spec]/2 are defined, but never used again, anywhere in the standard. This is possibly a case of dead wording.
Here is a link to the section in question.