I'm using

pragma(msg, __FILE__, "(", __LINE__, ",1): Debug: ", "A useful debug message");

to print compile-time information formatted as standard compiler diagnostics.

These are picked up by Emacs Flycheck and overlayed in the editor and listen in the *Flycheck errors* buffer. Very convenient. When I want to get the type of something at compile-time.

In order to not having to repeat oneself I'm now looking for a way to extract this into a `mixin template`. Is this possible somehow and still preserve the instantiation site values of `__FILE__` and `__LINE__`?

Reply via email to