How should RHS operators be handled?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- cpp
调研方向
未指定任何实现文件、测试或入口点。首先明确是否应支持右侧运算符,然后将 friend 声明与提议的注解进行比较,并确定反射将如何发现它们。项目为这些运算符确定了语法和行为,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Since interfaces are defined as structs, there is not an obvious way for how binary operators should be defined where the interface is the right-hand side operand, e.g.:
struct S {
friend std::ostream& operator<<(std::ostream& out, const S& self);
};
struct Printable {
// how should this be specified?
};
Is this something we want to support? If so, how should it be written?
One possibility is to write the friend declaration in Printable, but I do not know if there's a way to discover that via reflection. Another is to use the approach from duck, which uses annotations:
struct Printable {
[[=rjk::right_side]]
std::ostream& operator<<(std::ostream& out) const;
};
struct AddableWithInt {
[[=rjk::both_sides]]
int operator+(int) const;
};
However this could be considered too complex / not matching STL style. Any thoughts?
- 主要语言
- C++
- 星标
- 12
- 派生
- 4
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 15
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jbcoe/cc-protocol 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
jbcoe/cc-protocol#507 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
jbcoe/cc-protocol#455 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
jbcoe/cc-protocol#407 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
jbcoe/cc-protocol#194 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
jbcoe/cc-protocol#513 ·
维护者通常 1 天内回复
查看 jbcoe/cc-protocol 的全部 Issue
相似的 Issue
-
bot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
stephenberry/glaze#3126 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS pools可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
chromiumembedded/cef#4376 ·
维护者通常 1 天内回复