4 ms·
Yes, I know, but there is no way to enforce it. This a classic "noob" mistake with macros - using a macro argument more than once.
by eps 15y ago
Yes, I know, but there is no way to enforce it. This a classic "noob" mistake with macros - using a macro argument more than once.
- dkersten 15y agoThat's why in C++ people seem to generally recommend inline functions instead. Not only do the arguments only get evaluated once, but the whole thing is type safe too. Of course, people still misuse macros.
- CGamesPlay 15y agoI feel pretty safe assuming a pure function in a blog post about the advantages of immutability, really.