-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 C++17 build errors #2328
Comments
Seems related to named arguments. Did it work before ca82198? cc @alexezeder |
Thanks for checking. I don't have msvc at hand to investigate but a PR with a workaround if you find one would be welcome. Otherwise we could just disable relaxed constexpr support on problematic msvc version. |
There is definitely a problem with Another problem is probably related to changes of handlers, it can be seen on MSVC 19.20 - https://godbolt.org/z/hnqqKnqGx. |
Maybe revert commit 39c3c4e? |
If need, I can make and test the PR to reverting the commit 39c3c4e ? |
I don't think it makes sense to revert. I am OK with disabling constexpr on msvc 2017 since it's kinda mess anyway. |
After replace: error on msvc 2017:
The error is similar to the error in msvs 2019 19.20.27519. |
Worked around in ed2a637. |
On MSVC 19 error reporting inside FMT_STRING is cryptic https://godbolt.org/z/xbveGx13x
On my machine results in:
While gcc is correct:
|
To be precise, they both say the same thing, but the result is slightly different, so IMHO GCC isn't correct, as well as MSVC isn't incorrect here. 😉 The reason why the output from GCC is better is that it uses code snippets in this case. Snippets help to understand the context. Here is the output without code snippets:
|
Commit: 19d45f4
MSVC 19.16.27045.0 + C++17:
https://github.com/phprus/fmt/runs/2704761925?check_suite_focus=true#step:5:46
and (
cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=17 -G "NMake Makefiles" ..\..
):MSVC 19.20.27519.0 + C++17 (
cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=17 -G "NMake Makefiles" ..\..
):The text was updated successfully, but these errors were encountered: