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.expl.spec] p6 explicitly specialized class vs explicitly specialized class template #4846
Comments
There is no such thing as an "explicitly specialized class". There are classes, class templates, and explicit specializations of class templates (also called "class template explicit specialization"). The first sentence you quote is simply missing "template" at the end. I haven't waded through the rest of it, but likely "template" is missing in a few places. |
If you have done that, you would find many defects in this whole clause [temp.expl.spec], I believe. I'm implying CWG529 Incidentally, I think it may exist the (member) class explicit specialization, consider the following case template<class T>
struct A{
class B{};
};
template<>
struct A<int>::B{ int b;}; // class explicit specialization for the enclosing class template specialization. In this case, |
This reading does not make sense: You can also explicitly specialize a member function of a class template, but your reading doesn't provide for that. I think we're simply missing a few "template" words in p6. |
That's an explicit specialization for |
The above rule in paragraph 6 may cover the case I mentioned if we could say the template<class T>
struct D{
template<class U>
struct E{}; //#1
};
template<>
template<class U>
struct D<int>::E{
U member_;
}; Since we explicitly specialized the member class template for class template specialization D< int >, hence the definition of the explicitly specialized member class template is unrelated to that at
Incidentally, |
Isn't that the same things are also for an explicitly specialized class template? I also think explicitly specialized class and explicitly specialized class templates are different according to the context of [temp.expl.spec]. I think the first sentence should be that
For the second sentence
Isn't that the definition of the class explicit specialization shall be reachable? I think it should be that
For the third sentence
Again, the same is true when it is the definition of an explicitly specialized class template. It should be that
Both the definition of
#2
and#3
are unrelated to that of#1
For the fourth sentence
Isn't that the same is true when defining the member of an explicitly specialized member class template?
The text was updated successfully, but these errors were encountered: