cplusplus / cplusplus/draft

[temp.expl.spec] p6 explicitly specialized class vs explicitly specialized class template

Open
#4,846 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

A member of an explicitly specialized class is not implicitly instantiated from the member declaration of the class template

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

A member of an explicitly specialized class or class template is not implicitly instantiated from the member declaration of the templated class; instead, the member of the class template specialization shall itself be explicitly defined if its definition is required.

For the second sentence

The definition of the class template explicit specialization shall be reachable from the definition of any member of it.

Isn't that the definition of the class explicit specialization shall be reachable? I think it should be that

The definition of the class or class template explicit specialization shall be reachable from the definition of any member of it.

For the third sentence

The definition of an explicitly specialized class is unrelated to the definition of a generated specialization. That is, its members need not have the same names, types, etc. as the members of a generated specialization.

Again, the same is true when it is the definition of an explicitly specialized class template. It should be that

The definition of an explicitly specialized class or class template is unrelated to the definition of a generated specialization or the class template. That is, its members need not have the same names, types, etc. as the members of a generated specialization.

template<class T>
struct A{
  template<class U>
 struct B{};  //#1
};
template<>
template<class T>
struct A<int>::B{};  //#2

template<>
template<>
struct A<short>::B<int>{}; //#3

Both the definition of #2 and #3 are unrelated to that of #1

For the fourth sentence

Members of an explicitly specialized class template are defined in the same manner as members of normal classes, and not using the template<> syntax. The same is true when defining a member of an explicitly specialized member class.

Isn't that the same is true when defining the member of an explicitly specialized member class template?

Members of an explicitly specialized class template are defined in the same manner as members of normal classes, and not using the template<> syntax. The same is true when defining a member of an explicitly specialized member class template or member class.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the wording in [temp.expl.spec] and compare each of the four quoted sentences with examples #1–#3. Confirm the intended distinctions between explicitly specialized classes, class templates, and member class templates, then revise the draft wording so the examples and terminology are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.