When defining macro with zero arguments we can define it with parentheses, thus looking more like function or without parentheses.
What is preferable (probably there’s no right answer) way of doing it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As a general rule, I would expect
MACRO()to generate executable code, which may have side-effects. I useMACRO(sans parentheses) for more structural things that yield declarations, boilerplate, or constants.