alecthomas / alecthomas/entityx

Allow for move-only components.

未关闭
#208 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
2.3k
派生
301
PR 合并指标
30 天内没有已合并 PR

描述

Right now, trying to do `e.assign(...)` for some C that has a deleted copy constructor will cause a substitution error when instantiating ComponentHelper::copy_component_to, even if that method is never called as the vtable still must be constructed. It would be nice to have proper support for move-only components as well.

A simple solution is to use SFINAE on ComponentHelper:
```
template
+class ComponentHelper>>: public BaseComponentHelper { ... }
```
and to not actually copy in copy_component_to, but that delays any errors trying to copy until runtime. That is suboptimal, and there should be a much more elegant solution.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。