re: Help fix my bloated C++ macros! VIEW POST

re: The first thing I usually do is try to directly convert the macro to a proper function without changing the name and then test. If there's a nested...

I've pushed a lot into functions already. I need to get the calling location though, so I have to get access to LINE and FILE somehow. That, along with the other boilerplate I don't really want to repeat.

The conditional expansion of the logged values is an essential must as well. The rules on eliminating expressions are simply not good enough that I'll avoid the expensive creation (the optimizer just won't know there are no side-effects in the called function unfortunately).

code of conduct - report abuse