posts: multiple-dispatch: add visit downside
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a7e77c5307
commit
d59be54c14
|
@ -258,3 +258,7 @@ int main() {
|
||||||
// Calls CollideDispatch::operator()(Spaceship&, Asteroid&)
|
// Calls CollideDispatch::operator()(Spaceship&, Asteroid&)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Obviously, the issue with adding a new `SpaceStation` variant is once again
|
||||||
|
apparent in this implementation. You will get a compile error unless you handle
|
||||||
|
this new `SpaceStation` variant at every point you `visit` the `SpaceObject`s.
|
||||||
|
|
Loading…
Reference in a new issue