Skip to content
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

Does this actually work on MSVC? #4

Open
cbeck88 opened this issue Aug 6, 2016 · 4 comments
Open

Does this actually work on MSVC? #4

cbeck88 opened this issue Aug 6, 2016 · 4 comments

Comments

@cbeck88
Copy link

cbeck88 commented Aug 6, 2016

Hi, I started adding appveyor testing to my lib that was using this, and I found that msvc wouldn't work with it. I thought that I had gotten it to work when I pasted into the online compiler... but now I'm not sure of that.

I googled around and found an SO question about __VA_ARGS__ on MSVC apparently being buggy:

http://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly
http://stackoverflow.com/questions/32399191/va-args-expansion-using-msvc
http://stackoverflow.com/questions/21869917/visual-studio-va-args-issue

Do you know if map macro takes this into account?

Would you potentially be interested in a patch that implements one of these workarounds if not?

I'm not really a windows person... and I'm kind of hoping that MSVC will be abandoned en masse when clang is supported in visual studio. But this shouldn't actually be that hard to fix I think...

(It may very well actually be a bug in my code unrelated to map macro, I'm not totally sure.)

cbeck88 added a commit to cbeck88/visit_struct that referenced this issue Aug 29, 2016
@swansontec
Copy link
Owner

I don't have a Windows box at the moment, but if you provide a pull request, I would be happy to merge it. I think the approach in visit_struct looks reasonable. One could arguably use the VS2015 solution on all platforms, avoiding the ugly #ifdef, since it's simple enough.

@cbeck88
Copy link
Author

cbeck88 commented Oct 28, 2016

That commit didn't actually work unfortunately, I don't have a windows box either to test it right now. I plan to come back to this some time soon, or maybe over the holidays.

@9chu
Copy link

9chu commented Mar 14, 2018

Seems not work under MSVC (VS2017)

@akbyrd
Copy link

akbyrd commented Sep 29, 2022

It works with /Zc:preprocessor which was added in VS 2019 / 16.5 (and a little earlier as /experimental:preprocessor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants