自分のクラスをキーとして使用しているとしますstd::unordered_map
class MyClass {
public:
int a, b;
}
www.cplusplus.comには、使用できる次のコンストラクターがリストされています。
explicit unordered_map ( size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& alloc = allocator_type() );
上記のコンストラクターを使用して、すべてのパラメーターを作成する方法の例を教えてくださいstd::unordered_map<MyClass, std::string>
。