You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a small macro to display a debugging log.
Except that when you forget to specify the argument after using brackets, it causes an undetected block
Example:
LOG_DEBUG("{}::blabla") -> The code crashes at runtime with no errors or anything.
Would you have a solution to avoid this kind of error? I looked at static assert when trying to create a template function, but when I don't want to use brackets in my debugging macro, I also get an error at compile time (e.g. LOG_DEBUG("hello"); ) :
Hello,
I made a small macro to display a debugging log.
Except that when you forget to specify the argument after using brackets, it causes an undetected block
Example:
LOG_DEBUG("{}::blabla") -> The code crashes at runtime with no errors or anything.
correct version: LOG_DEBUG("{}::blabla", a.x) ;
Would you have a solution to avoid this kind of error? I looked at static assert when trying to create a template function, but when I don't want to use brackets in my debugging macro, I also get an error at compile time (e.g. LOG_DEBUG("hello"); ) :
Thanks,
The text was updated successfully, but these errors were encountered: