Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

storage_adaptor<std::vector> missing efficient move assignment from std::vector

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
data, performance

調査の方向性

まず、issue 内の unsafe_access::storage の例を使って、storage_adaptor の代入オーバーロード、特に vector_impl::operator=(const U&) を追跡します。現在 rvalue の std::vector がどのように選択されるかを確認し、代入によってコピーなしにストレージが移譲されることを示すテストカバレッジを追加します。完了条件は、提示された例が効率的な move パスを使用することです。

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

説明

Often times to extend the behaviour of boost::histogram, we need unsafe access to storage. And there is one performance issue with working with storage_adaptor.
My use case can be simplified to:

auto hist = make_histogram_with(std::vector<std::size_t>(), axis::regular(100, 0, 100));
auto& storage = unsafe_access::storage(hist);
storage = std::vector<std::size_t>(1000);

The storage = std::vector<std::size_t>(1000); line would not call the move assignment operator, but rather vector_impl::operator=(const U& u), which copies the values instead of just swapping the data pointer.

主要言語
C++
スター
334
フォーク
76
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

boostorg/histogram のほかの issue

boostorg/histogram の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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