provide multi_array::swap

未關閉
#33 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
30/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
cpp
領域
data

研究方向

首先檢查 multi_array 目前的 resize 方法,以及 issue 中提到的 private 資料成員。將要求的 swap 操作與 issue #24 比較,並判斷預期結果是 public swap 還是 protected 存取;當子類別可以在指派期間進行 resize 而不使用 type-punning 時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

... or at least make its members protected to allow a subclass to do so.

swap would be substantially the same as the current resize method.

Background: I use a subclass of multi_array in order to resize during assignment to get around the most dagnerous multi_array pitfall. This works, but I'd also like to fix another longstanding inefficiency ( #24 ) while I'm at it. Unfortunately the private data members make it impossible to fix in my subclass (barring a type-punning hack).

主要語言
C++
星號
32
分支
39
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

boostorg/multi_array 的其他 Issue

查看 boostorg/multi_array 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。