variadic min/max/minmax
まだ誰も着手していません。
評価
調査の方向性
添付された minmax_variadic.hpp.txt の提案から始め、Boost.Algorithm にある既存の min、max、minmax のエントリポイントを調査してください。comparator パラメータの設計を確定し、参照ベースの引数と minmax 比較に対して期待される動作を判断してください。variadic API がプロジェクトに統合され、その動作が適切なテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello,
for min/max/minmax with multiple parameters there are only functions per std::initializer_list:
https://en.cppreference.com/w/cpp/algorithm/min
https://en.cppreference.com/w/cpp/algorithm/max
https://en.cppreference.com/w/cpp/algorithm/minmax
The parameters are always passed by value and not by reference and the result is also a value. This is a problem with types like std::array, std::string, etc.
Since the compare class cannot be the last function parameter in a variadic implementation (as in the std implementations) another position must be found, possibilities:
- first function parameter: 2 implementations would be needed each, once with compare class and once without. I don't find that useful.
- first template parameter: only one implementation is needed with default template parameter(s).
A simple variadic implementation could look like this:
minmax_variadic.hpp.txt
minmax needs 2 compare classes (each for min and max) - this is more flexible.
thx
Gero
- 主要言語
- C++
- スター
- 131
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/algorithm のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Automated formatting オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
boostorg/algorithm の issue をすべて見る
似ている issue
-
ai_reviewed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ydb-platform/ydb#53869 · コメント 3 件 ·
-
bug cert blocker needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
project-chip/connectedhomeip#74373 ·
-
upstream update
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conan-io/conan-center-index#31035 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
vllm-project/vllm-ascend#17329 ·