The program above passes a raw pointer to a Point to the function f. It is probably a better idea to wrap p (the point (1,2)) in a unique_ptr already in main,
and to pass a unique_ptr to f. Provide for this change.
In addition we want to return (the ownership of) the unique_ptr in a2 back to main via a value return. Please do that.
In this exercise, please be aware that unique pointers cannot be copied - they must be moved.