下面的代码为std::tuple实现了一个散列函数,然后在std::unordered_map of std::tuples中的一个不同的代码库中使用该函数。(Args)>::hash_compute(t); // will use std::unordered_map of std::pair too, so overload reqdstd::<e
因此,我希望实体有一个集合,可能是一个std::unordered_map,通过它我可以提供一个类类型并获得适当的索引,或者是某个数字(在本例中是SHRT_MAX),它告诉我实体没有这样的组件。我已经提供了我的代码示例,其中包含我正在寻找的那些注释掉的示例:#include <vector>
class Comp