3 ms·
For one, templates can be stepped through on the debugger without additional effort, offer type checking, don't execute parameters multiple times, and don't req
by pjmlp 2y ago
For one, templates can be stepped through on the debugger without additional effort, offer type checking, don't execute parameters multiple times, and don't require additional parenthesis and curly braces to protect their misuse.
- uecker 2y agoDebuggers can expand macros, and you can also look at the pre-processed output or even compile that (you can't the expanded form with templates). But I agree that if it becomes more complicated this is not very good. But you know, this does not matter too much to me as I will neither use complicated macros nor templates. And simple macros are just fine.