Feature request: constructor and resize from values
还没有人认领这个 Issue。
评估
调研方向
首先定位 issue 中描述的 multi_array 构造函数和 resize API,然后检查它们当前如何初始化元素,以及 std::vector 如何接受一个值。确定在创建数组或调整数组大小时提供 value_type 的受支持设计。当无法默认构造的类可以在不产生严重编译器错误的情况下存储,并且现有的基于 extent 的行为仍受支持时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Hello, this is a copy of my email I sent to the boost-users mailing list, as it might improve visibility.
I'd love to be able to use multi_array with classes that do not have a default constructor. At the moment, this is impossible, as both the constructor and resize functions only take extents as arguments (and possibly some other options), but no value_type, as for example std::vector does. Thus, trying to store objects without a default constructor in a multi_array results in hard compiler errors, with no workaround that I know of.
This happens to me fairly often, as I use multi_array to organize sets of complex objects. If there is a technical reason why this is not possible, I would also be happy to learn it.
- 主要语言
- C++
- 星标
- 32
- 派生
- 39
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
boostorg/multi_array 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
boostorg/multi_array#38 · 2 条评论 · 1 个 reaction ·
-
boostorg/multi_array#35 · 2 条评论 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 35/100
boostorg/multi_array#34 ·
-
难度 5/5 一周以上 新手友好度 30/100
boostorg/multi_array#33 ·
-
难度 4/5 3-5 天 新手友好度 35/100
boostorg/multi_array#32 ·
查看 boostorg/multi_array 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
duckdb/duckdb-wasm#2258 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend 未关闭coarray
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·