3 ms·
Unless this is about some particular technique I've missed, isn't this what virtual methods are for? Only place I'm aware of where you see macros-based polymo
by marginalia_nu 2y ago
Unless this is about some particular technique I've missed, isn't this what virtual methods are for? Only place I'm aware of where you see macros-based polymorphism is in C.
- cherryteastain 2y agoVirtual methods are runtime polymporphism. Templates are compile time polymorphism, and therefore typically are faster (more inlining + avoiding virtual function call).
- pjmlp 2y agoNo need for macros in compile time polymorphism.