Templates are the main thing in C++ that you can easily use everywhere with zero costs in compatibility.
And they certainly beat C's "equivalent", macros.
And they certainly beat C's "equivalent", macros.
That's what wxWidgets did since forever, and to the dismay of C++ purists, I find their code easier to read than most templates.
Not to mention it compiles much faster.