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
MSVC compile errors with /Zc:__cplusplus #61
Comments
please provide the link to the docs for |
Here: It simply changes the macro. |
provide please the preprocessed code of |
Full sample one_memfn.zip I changed |
hmm... there is no preprocessed code in the archive... |
did this solve your problem? |
Ah, I just didn't understand. This preprocessed code main.zip ?
No, it didn't. This seems like a bug in the examples. The macro without the underscores cannot be found. |
yes. I think was fixed in master, please check and let me know the result. |
Still errors. Now The function fnv1a(const CharT ...) gets skipped. I thought about |
my bad, sorry. |
It works. |
great, please close. |
I'm using Visual Studio 2019. When I add option /Zc:__cplusplus (fixes __cplusplus macro value) it refuses to compile. I get strange errors like
yas\include\yas\types\std\pair.hpp(63,1): error C2975: '_Val': invalid template argument for 'std::integral_constant', expected compile-time constant expression
I did a quick test with file examples/one_memfn/main.cpp
This compiles:
cl main.cpp /I"../../include" /EHsc /std:c++17 /permissive-
And this does not:
cl main.cpp /I"../../include" /EHsc /std:c++17 /permissive- /Zc:__cplusplus
This probably has something to do with fnv1a function in include\yas\detail\tools\fnv1a.hpp . If you switch to the code for __cplusplus < 201402L yas compiles just fine.
The text was updated successfully, but these errors were encountered: