Best way to compare actors in C++?

Apologies, I removed the previous comment due to the code being obviously faulty (using “this” incorrectly, hence I’ve attached an amended copy)