Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#9,350 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
tex
领域
documentation

调研方向

首先在草案源文本中搜索 “potentially throwing”,并将每个出现位置与 [except.spec]/1 和 6 中的定义进行比较。检查列出的条款,包括 [basic.stc.dynamic.deallocation]/3、[concept.destructible]/2 和 [exec] 条款,然后更新不一致的措辞。完成的标准是:所引用的出现位置统一使用该术语,并且没有更改任何非预期的匹配项。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TeX
星标
221
派生
813
平均合并
13 小时 58 分钟
30 天内合并 PR
32

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cplusplus/draft 的其他 Issue

查看 cplusplus/draft 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。