#include <iostream>
#include <unordered_set>

struct B
{
   int x, y;
};

class A
{
   struct hash
   {
      std::size_t operator()( int const a ) const
      {
         return std::hash<int>()( a );
      }
   };

   struct equal_to
   {
      std::size_t operator()( int const a, int const b ) const
      {
         return std::equal_to<int>()( a, b );
      }
   };

   public:
      std::unordered_set< int, hash, equal_to > set;
      void push( const B& b )
      {
         set.insert( b.x );
      }
};
int main(int argc, char**)
{
    A a;
    a.push({4, 7});
    a.push({15, 7});
    a.push({15, 7});
    a.push({101, 10});

    for (auto i: a.set) std::cout << i << "\n";
}
