Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ハッシュ生成とキー比較のために別のオブジェクトを宣言するのではなく、この機能のためにキー クラスにメンバー関数を作成することは可能ですか?
コメントに記載されているように、クラスの を簡単に定義できますoperator==。hash_valueクラスのパラメーターを受け取る無料の関数を作成することもできます。これは自動的に使用されます。
operator==
hash_value