Double dispatch/multimethods in C++
You missed the “double” part of the double dispatch. The point of this pattern is to make sure that the right method of the processor is called – the method that accepts the right type. Since the processor is initially not aware of the type of the object that’s passed to it, you need the … Read more