1. #pragma once
  2.  
  3. template <class Type = double>
  4. class TPoint : private std::pair<Type, Type> {
  5. public:
  6.     Type x = &first;
  7.     Type y = &second;
  8.  
  9.     TPoint(Type x, Type y) : first(x), second(y) { };
  10.     Type& x() { return first;  };
  11.     Type& y() { return second; };
  12. };
  13.  
  14. typedef TPoint<> Point;