by amluto · 2y ago · 0 comments
Logger l;
That’s a Logger, and it will not magically become a subclass.And changing this to go through pointers everywhere and to use virtual functions, in C++, is not very performant. A good JIT compiler may be able to effectively devirtualize it, but C++ compilers are unlikely to be able to do this effectively.
The "Server" class, or whatever instantiates the Logger, will have to change, but that might not be such a big deal.
So yes, the author was wrong about not having to modify any code, but likely you won't have to modify most code.