Skip to content

Hardened preconditionsを考えて関数の雛形に適用する #1428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
faithandbrave opened this issue Mar 26, 2025 · 0 comments
Open

Comments

@faithandbrave
Copy link
Member

C++26からoperator[](int i);のような関数の「i < sizeであること」のような事前条件が、「Hardened preconditions (堅牢化された事前条件)」という項目で記述されるようになります。

これはassertがリリースモードで無効になるこれまでの仕組みに対して、Clangのlibc++がHardening Modesというのを追加し、none, fast, extensive, debugのような堅牢化レベルを導入した経緯からきてるものです。

つきましては、cpprefjpの対応として、以下の作業が必要になります:

  • Hardened preconditionsの訳語を考える
  • 関数の雛形ページに項目を追加する
  • 用語を追加する

訳語以外は作業するだけですので一旦訳語を相談させてください。おそらく以下のどちらかになるかと思いますが、どちらがよいでしょうか?

  • 堅牢化された事前条件
    • 用語らしさが劣るが説明的ではある
  • 堅牢事前条件
    • 用語らしさがあるが漢字が6連続になって読みにくさはある

ほかにも提案あればいただきたいです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant