为什么不std::unordered_map<tuple<int, int>, string>开箱即用?必须为定义一个哈希函数很麻烦tuple<int, int>,例如template<> struct do_hash<tuple<int, int>> { size_t operator()(std::tuple<int, int> const& tt) const {...} }; 以元组为键(Matthieu M.)构建无序地图显示了如何自动执行boost::tuple。有没有为c ++ 0x元组执行此操作而不使用可变参数模板?
3 回答
- 3 回答
- 0 关注
- 606 浏览
添加回答
举报
0/150
提交
取消