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

"potentially throwing" v.s. "potentially-throwing"

Aperta Adatta ai principianti
#9,350 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
tex
Ambito
documentation

Direzione di ricerca

Inizia cercando “potentially throwing” nel testo sorgente della bozza e confronta ogni occorrenza con le definizioni in [except.spec]/1 e 6. Esamina le clausole elencate, incluse [basic.stc.dynamic.deallocation]/3, [concept.destructible]/2 e le clausole [exec], quindi aggiorna la formulazione incoerente. Il lavoro è completo quando le occorrenze citate utilizzano la terminologia in modo coerente e non sono state modificate corrispondenze non intenzionali.

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

Descrizione

The correct form seems to be "potentially-throwing" (with hyphenation), see [except.spec]/1, 6

The predicate indicating whether a function cannot exit via an exception is called the exception specification of the function. If the predicate is false, the function has a potentially-throwing exception specification, otherwise it has a non-throwing exception specification. ...

An expression E is potentially-throwing if ...

The following lists occurances of "potentially throwing".

  • [basic.stc.dynamic.deallocation]/3

Each deallocation function shall return void. A deallocation function shall not have a potentially throwing exception specification ([except.spec]). ...

  • [except.spec]/4

If a declaration of a function does not have a noexcept-specifier, the declaration has a potentially throwing exception specification unless it is a destructor or a deallocation function or is defaulted on its first declaration, in which cases the exception specification is as specified below and no other declaration for that function shall have a noexcept-specifier. ...

  • [concept.destructible]/2

[Note 1: Unlike the Cpp17Destructible requirements (Table 35), this concept forbids destructors that are potentially throwing, even if a particular invocation of the destructor does not actually throw. — end note]

  • [exec.snd.general]/3, 4

... [Example 1: Let sndr2 be the sender then(sndr, fn). sndr2 has the same set_value completion domain tag as sndr, but if fn's evaluation is potentially throwing, sndr's set_error completion domain tag would be the COMMON-DOMAIN of sndr's value and error completion domain tags, in accordance with the semantics of the then algorithm ([exec.then]). — end example]

[Example 2: Let sndr2 be the sender from the example above. The set_value completion scheduler of sndr2 is the set_value completion scheduler of sndr, if any. But sndr2 can only report a set_error completion scheduler when invocations of fn are not potentially throwing or when sndr has no set_error completions. When fn can throw, sndr2 could complete with set_error either by forwarding an error completion from sndr or by completing with the exception thrown by fn, which would happen on an agent associated with sndr's set_value completion scheduler. — end example]

  • [exec.snd.expos]/22, 32

Remarks: The expression in the noexcept clause is true if the return statement above is not potentially throwing; otherwise, false.

Remarks: The expression in the noexcept clause is true if the return statement is not potentially throwing; otherwise, false.

  • [exec.continues.on]/10

The expression in the noexcept clause of the lambda is true if the construction of the returned state-type object is not potentially throwing; otherwise, false.

Lingua principale
TeX
Stelle
221
Fork
813
Merge medio
13h 58m
PR unite (30g)
32

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.