Multiple dispatch with variant and multi visitation in C++
It's a good example of multimethods in C++. But you should be aware that variant takes at least as much space as the biggest of its argument. It's done so to minimize overhead of walking an additional pointer. Probably, you need a variant with another allocation policy, as asteroids and spaceships are quite numerous. 

But, to be serious, there's an even bigger problem: extension. You would like to


define new functions that do something with asteroids, spaceships or tuples of them;
define new types of asteroids and spaceships;
modify code only locally.


Your solution needs to have variant&lt;list, of, all, objects, of, the, kind&gt; in several places of your code in addition to defining a new classes for new types of game objects. That's a non-local change.