DRAFT.md: `protocol` synopsis disagrees with the implementation on assignment, `noexcept` and the destructor

オープン
#508 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
documentation

調査の方向性

Start with the protocol synopsis in DRAFT.md and compare it with the declarations in xyz/protocol.hh, using polymorphic in P3019 as the reference. Check the allocator-extended move constructor's noexcept specification, the missing copy and move assignment operators, and the destructor's constexpr status. Done means the synopsis matches the implementation on those three points, and OUTLINE.md is left unchanged.

索引モデルが issue の本文から書いたものです。

説明

Three places where the protocol synopsis in DRAFT.md matches neither xyz/protocol.hh nor P3019's polymorphic. OUTLINE.md already lists the default constructor, the narrowing constructors and the "identical constexpr" claim as R3 corrections. These are not on that list.

  1. The allocator-extended move constructor is unconditionally noexcept. With unequal allocators it allocates and move-constructs the owned object, so it can throw. The implementation and polymorphic use noexcept(allocator_traits<Allocator>::is_always_equal::value). #194 covers the semantics; the synopsis needs the matching exception specification. The allocator-extended narrowing move constructor has the same problem if narrowing stays (#88).
  2. There are no assignment operators. The synopsis declares neither copy nor move assignment. The implementation has both, generated conditionally like the constructors. Move assignment is noexcept when the allocator is always equal or propagates on move assignment, as in polymorphic.
  3. The destructor is not constexpr. The implementation's and polymorphic's are.
主要言語
C++
スター
12
フォーク
4
平均マージ
1日 11時間
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jbcoe/cc-protocol のほかの issue

jbcoe/cc-protocol の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。