fixup! WIP: posts: add mutiple-dispatch-in-c++
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bruno BELANYI 2022-11-02 15:54:37 +01:00
parent 70f99f21fa
commit 30ffd90b2a

View file

@ -161,8 +161,8 @@ void collide(SpaceObject& first, SpaceObject& second) {
}; };
int main() { int main() {
std::unique_ptr<SpaceObject> asteroid = std::make_unique<Asteroid>(); auto asteroid = std::make_unique<Asteroid>();
std::unique_ptr<SpaceObject> spaceship = std::make_unique<Spaceship>(); auto spaceship = std::make_unique<Spaceship>();
collide(*asteroid, *spaceship); collide(*asteroid, *spaceship);
// Calls in order: // Calls in order: