There are several problems in the code:
std; (, std::hash). MyKey std.
operator() . MyKey , . , const.
std::hash argument_type result_type.
, SType .., , .
-, .
, , std::hash:
template<typename SType, typename AType, typename PType>
struct MyKey {
const SType from;
const AType consume;
const PType pop;
};
namespace std {
template<typename SType, typename AType, typename PType>
struct hash<MyKey<SType, AType, PType>>{
using argument_type = MyKey<SType,AType,PType>;
using result_type = std::size_t;
result_type operator ()(argument_type const& key) const {
result_type s_hash = std::hash<SType>()(key.from);
result_type a_hash = std::hash<AType>()(key.consume);
result_type p_hash = std::hash<PType>()(key.pop);
return p_hash;
}
};
}