#include #include #include using namespace std; class key { int i; public: key(int initial_i): i(initial_i) {} friend bool operator==(const key& key1, const key& key2) { return key1.i == key2.i; } }; int main() { map m; cout << m[key(10)] << "\n"; return EXIT_SUCCESS; }