#include <iostream>
#include <unordered_set>
#include <functional>
#include <cassert>

struct TTest {
    char essence;
    mutable void* aux_nohash;
    
    bool operator == (const TTest& other) const { if(!aux_nohash) aux_nohash = NULL; return this->essence == other.essence; }
};

namespace std {
template<> struct hash<TTest> {
    size_t operator() (const TTest& val) const { return std::hash<char>()(val.essence); };
};
} // namespace std

int main() {
    TTest dick1 {'1', NULL};
    TTest dick2 {'2', &stdin};
    TTest dick3 {'3', NULL};
    TTest dick4 {'2', &dick1};
    std::hash<TTest> hash;
    assert(hash(dick1) != hash(dick2));
    assert(hash(dick2) == hash(dick4));
    assert(hash(dick1) != hash(dick3));
    
    std::unordered_set<TTest> your_anus;
    your_anus.insert(dick1);
    your_anus.insert(dick2);
    your_anus.insert(dick3);
    assert(your_anus.count(dick4) < 1);
}
