cplusplus / cplusplus/draft

[dcl.meaning.general] p6 Which specifiers in the decl-specifier-seq contribute to the type of declarations are underspecified

Open
#5,157 0 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

For the type of a declaration, only [dcl.meaning.general] p6 has a brief statement, that is

Thus, (for each declarator) a declaration has the form

T D

where T is of the form attribute-specifier-seqopt decl-specifier-seq and D is a declarator. Following is a recursive procedure for determining the type specified for the contained declarator-id by such a declaration.

First, the decl-specifier-seq determines a type. In a declaration

T D

the decl-specifier-seq T determines the type T.

decl-specifier-seq is a sequence of decl-specifiers, where decl-specifier is separated into nine kinds of specifiers. The current standard does not explicitly specify which specifiers contribute to the type of declarations. Although, the text "type" in defining-type-specifier may hint that they designate the type. I think we may narrow the scope of specifiers in provision [dcl.meaning.general] p6, which may be that

In a declaration

T D

Except otherwise specified, the defining-type-specifiers in the decl-specifier-seq determine the declaration's type.

For instance, the exception is constexpr specifier, when it is declared in an object declaration, the effect on the type is the same as const, which is a special case specified in [dcl.constexpr] p10.

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

Read [dcl.meaning.general] p6 alongside the decl-specifier-seq and defining-type-specifier provisions, then compare the constexpr exception in [dcl.constexpr] p10. Done means the standard clearly identifies which specifiers determine a declaration's type and handles the stated exception consistently.

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.