nodejs / nodejs/node-addon-api
Adopt C++20 defaulted comparisons (operator== / <=>)
オープン
まだ誰も着手していません。
blocked
SemVer-major
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 499
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 2
説明
Several node-addon-api types define operator== and operator!= as an explicit pair, where the != is always return !operator==(other);. In C++20 the compiler synthesizes a != b from operator==, so the hand-written != overloads become redundant and can be removed. Where the comparison is plain memberwise equality, operator== itself can be = defaulted.
Regarding <=>, the only plausible type is Maybe<T> where T is ordered.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
明示的な operator== と operator!= のペアを定義している node-addon-api の型を特定し、続いて順序比較について Maybe を調べます。冗長な != オーバーロードを削除し、比較動作を変更せずに、対象となる == または <=> 演算子を default 定義できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- api
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100