boostorg / boostorg/multi_array
Feature request: constructor and resize from values
- 主要语言
- C++
- 星标
- 32
- 派生
- 39
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by locating the multi_array constructor and resize APIs described in the issue, then inspect how they currently initialize elements and how std::vector accepts a value. Determine the supported design for supplying a value_type when creating or resizing an array. Done means non-default-constructible classes can be stored without hard compiler errors and existing extent-based behavior remains supported.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- data
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100