為什么不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 回答
- 0 關注
- 626 瀏覽
添加回答
舉報
0/150
提交
取消