4 ms·
This is not correct. They evaluate at the point where they are expanded. I’ve used them countless of times to implement “log” and “trace” macros that show file
by elteto 4y ago
This is not correct. They evaluate at the point where they are expanded.
I’ve used them countless of times to implement “log” and “trace” macros that show file/line.
- zabzonk 4y agoI have used them countless timers myself, but not within another macro Edit: Sorry I am on multiple drugs at the moment for a severe fracture - I'm a bit confused, nurse has just been. I will shut up now. To prove I am not completely out of it (though wrong), here's one I wrote a lot earlier: https://latedev.wordpress.com/2012/08/09/c-debug-macros/ https://latedev.wordpress.com/2012/08/09/c-debug-macros/
- gpderetta 4y agomost commonly they are typically used in the definition of the assert macro. For example: https://github.com/lattera/glibc/blob/master/assert/assert.h https://github.com/lattera/glibc/blob/master/assert/assert.h .