certain non-decomposable senders caus a compilation error
还没有人认领这个 Issue。
评估
调研方向
使用 beman/execution/execution.hpp 和 ex::get_completion_signatures 复现示例中的编译错误。检查 ex::tag_of_t 和 basic_sender 的检测路径,以了解为什么双参数 non_decomposable_sender 会被当作 decomposable 处理。完成标准是:示例无需移除构造函数参数即可编译,并且针对这一回归有覆盖。
由索引模型根据 Issue 内容生成。
描述
The following code results in a compilation error:
#include <beman/execution/execution.hpp>
namespace ex = beman::execution;
namespace {
struct non_decomposable_sender {
using sender_concept = ex::sender_t;
template <typename...>
static consteval auto get_completion_signatures() { return test_std::completion_signatures<ex::set_value_t()>(); }
non_decomposable_sender(int, int) {}
};
}
int main() {
(void)ex::get_completion_signatures<non_decomposible_sender, ex::env<>>();
}
Removing one of the int constructor parameters causes the code to compile!
The issue is that sender is used with ex::tag_of_t which tries to guess whether a type is decomposable. If it think it can decompose objects of a type it will extract a tag. However, the above type can't be decomposed.
Currently, I don't know how to properly fix the problem. The tentative plan is to rather detect if a sender is built using basic_sender (probably indirectly by actually detecting a nested type) and only try to decompose such senders.
- 主要语言
- C++
- 星标
- 150
- 派生
- 23
- 平均合并
- 3 天 5 小时
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bemanproject/execution 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
bemanproject/execution#247 · 1 条评论 · 3 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 72/100
bemanproject/execution#246 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 65/100
bemanproject/execution#245 · 4 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
bemanproject/execution#248 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
bemanproject/execution#207 · 7 条评论 ·
查看 bemanproject/execution 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
google/libultrahdr#485 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
godotengine/godot#123776 ·
-
bug
难度 1/5 1 小时以内 新手友好度 60/100
-
good first issue
难度 1/5 1 小时以内 新手友好度 90/100
-
good first issue
难度 2/5 1-3 小时 新手友好度 75/100
ros2/common_interfaces#344 ·