The purpose of using parsers in a macro is to control priority when expanding a macro. Consider:
if the macro is used as
X( 1 + 2, 3 )
we would presumably want the answer to be 9, but we get the extension:
1 + 2 * 3
giving us 7. To avoid this kind of thing, we had to write a macro like:
If priority is not an issue, brackets of any type are not mandatory, although brackets may be required depending on the semantics of the macros - if, for example, you want to create a local variable,
anon
source share