New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for empty "dbg()" calls. #64
Comments
Hello. This seems like something suitable for someone new to this repo. I'd be happy to take this on as a stepping stone. :) Want to assign it to me? |
Sure, sounds great! |
dbg can now be called like dbg() with no arguments. Works by using the VA_ARGS to determine how many arguements have been passed in via dbg_x. Also works just fine if DBG_MACRO_DISABLE is defined.
dbg can now be called like dbg() with no arguments. Works by using the VA_ARGS to determine how many arguements have been passed in via dbg_x. Also works just fine if DBG_MACRO_DISABLE is defined.
dbg can now be called like dbg() with no arguments. Works by using the VA_ARGS to determine how many arguements have been passed in via dbg_x. Also works just fine if DBG_MACRO_DISABLE is defined.
@sharkdp It seems to be basically impossible to have array initialisation AND multiple arguments (#2 ). Simply because this uses macros I don't think if we can get around this. But using templates more limits the ability to return multiple arguments like my implementation can. Another alternate is to simply make a seperate |
I think you are right. There is a similar limitation in It's not just initializer lists, but also comma-separated template arguments (
I also think so.
I believe I would rather give up multiple-argument support. I will close #2 and refer to this thread. How do we proceed with this PR? Do you think that we should still implement the empty-argument macro call? |
@sharkdp #67 can be pulled. The empty calls have no issue with any commas. Though at the current moment seems like the tests don't like my most recent commit. I'm not used to Appveyor, perhaps you can enlighten me on what's wrong. My only thought is that since it's a windows enviroment it does not like the |
dbg can now be called like dbg() with no arguments. Works by using the VA_ARGS to determine how many arguements have been passed in via dbg_x. Also works just fine if DBG_MACRO_DISABLE is defined.
Closing for now, as we now support multiple arguments (#2). Empty calls can not be supported, unfortunately. |
The
dbg-macro
call includes file, line and function information anyway, so emptydbg();
calls can be helpful as well (instead of a dummy
dbg("this is executed")
call).The text was updated successfully, but these errors were encountered: