cplusplus / cplusplus/draft

[temp.expl.spec] Is p13 too limited or is it intentional?

Open
#6,522 3 comments 0 reactions 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

The paragraph [temp.expl.spec] p13 says:

Whether an explicit specialization of a function or variable template is inline, constexpr, constinit, or consteval is determined by the explicit specialization and is independent of those properties of the template.
Similarly, attributes appearing in the declaration of a template have no effect on an explicit specialization of that template.

First of all, I don't like the wording, because it is not very clear that the consteval wording doesn't apply to variable templates. This should probably use "constexpr function", "inline function", "immediate function", and other clearly defined terms.

Secondly, "constexpr variable" is not defined, and this paragraph makes mention of it indirectly. See also https://github.com/cplusplus/draft/issues/6521. It should say "constexpr variable" with proper formatting, or "constexpr variable" should be defined.

Thirdly, shouldn't this paragraph apply to member templates too? How come this only applies to function templates, and not member function templates? How come this does not apply to templates of static data members?

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

Start with [temp.expl.spec] paragraph 13 and review the related discussion in issue #6521. Determine whether the wording should cover member templates and static data member templates, and clarify the terminology for function and variable properties. Done means the scope and terminology are resolved and the corresponding standard-draft wording is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.