Best way to compare actors in C++?

Might I recommend creating an actorComponent class, this type is effectively code that you can “bolt onto” any actor in it’s blueprint/c++.
It doesn’t have any display mesh, but allows you to add functionality.

I use a similar system in a game i am developing.
all intractable objects have a “GameObjectComponent” added, when I trace something I check if it has such a component and proceed to call “interacted” on that part.

I’d provide a code-sample, but i’m away from my codebase at the moment.