Should the default `SEXP` in `r_vector` be a typed vector of length 0 rather than `R_NilValue`?
还没有人认领这个 Issue。
评估
调研方向
Start at r_vector's default construction and data_ handling, then inspect how default-constructed vectors currently behave when attributes are assigned. Evaluate the proposed typed, length-zero SEXP against the allocation and noexcept trade-offs, and validate that default construction supports attributes without requiring R_NilValue handling.
由索引模型根据 Issue 内容生成。
描述
i.e. to support things like https://github.com/r-lib/cpp11/issues/315 where you default construct the vector and immediately try and put attributes on it.
Would also simplify internal code that currently has to account for the possibility of R_NilValue as data_ quite a bit.
We'd have to write our own default constructor but I think that's totally possible?
A downside of this is that the default constructor would have to allocate and would no longer be noexcept or as "cheap", but I can't see that mattering much because you eventually allocate anyways?
- 主要语言
- C++
- 星标
- 225
- 派生
- 52
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
r-lib/cpp11 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 3/5 1-2 天 新手友好度 42/100
-
难度 3/5 1-2 天 新手友好度 45/100
相似的 Issue
-
难度 2/5 半天 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
ROCm/rocm-libraries#12703 ·
维护者通常 2 天内回复
-
bug
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
Feature request
难度 2/5 1-3 小时 新手友好度 76/100
qbittorrent/qBittorrent#24975 ·
维护者通常 3 天内回复