DEV Community

Discussion on: Macro with current function name - __func__ vs __FUNCTION__

Collapse
 
bbasile profile image
Basile B. • Edited

You would appreciate D similar feature. If you run this example you can see that the macros (they are called special tokens actually in D) expand to the caller (__LINE__ gives 7).
That's very useful for logging or custom assertion functions.