class A {
private:
	int n;
public:
	A(int n) : n(n) {
	}
	bool operator < (const A *obj) {
		if (obj->n < this->n)
			return true;
		else if (this->n < obj->n)
			return false;
	}
	operator const A* () const {
		return this;
	}
};

int main()
{
	A a(4), b(5);
	a < b;
}