Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[meta.reflection.queries] [dcl.fct] Disagreement about whether `int()const` is const qualified

Aperta
#9,239 4 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cpp
Ambito
documentation

Direzione di ricerca

Inizia confrontando la formulazione citata in [dcl.fct] e [meta.reflection.queries], quindi cerca nella bozza gli usi di “cv-qualified”, “lvalue-qualified” e “rvalue-qualified”. Verifica in che modo la formulazione si rapporta a std::is_const_v<int()const>; il lavoro è completato quando la terminologia e l’intento delle reflection queries sono espressi in modo coerente senza implicare ordinary cv-qualified function types.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In [dcl.fct] there exists the following note:

A function type that has a cv-qualifier-seq is not a cv-qualified type; there are no cv-qualified function types.

However, [meta.reflection.queries] has the following wording for std::meta::is_const and std::meta::is_volatile:

Returns: true if T represents a const or volatile type, respectively, or a const- or volatile-qualified function type, respectively. Otherwise, false.

The former states that there are no cv-qualified function types, while the latter is directly implying the possibility of cv-qualified function types (otherwise the second half of the first sentence would be redundant). It is quite clear what the latter is trying to state, that is_const(^^int()const) should be true. But if int()const really is a const qualified type, then std::is_const_v<int()const> should be true too which is obviously not intended.

Also, the subsequent definition of std::meta::is_lvalue_reference_qualified and std::meta::is_rvalue_reference_qualified contains:

Returns: true if T represents an lvalue- or rvalue-qualified function type, respectively. Otherwise, false.

The intent here is clear too but "lvalue-qualified" and "rvalue-qualified" do not get used anywhere else.

Lingua principale
TeX
Stelle
221
Fork
813
Merge medio
17h 45m
PR unite (30g)
34

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cplusplus/draft

Tutte le issue di cplusplus/draft

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.