Skip to content

Build error with MSVC v141 #4412

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

Closed
hirohira9119 opened this issue Apr 14, 2025 · 2 comments · Fixed by #4413
Closed

Build error with MSVC v141 #4412

hirohira9119 opened this issue Apr 14, 2025 · 2 comments · Fixed by #4413

Comments

@hirohira9119
Copy link
Contributor

Issue

The build for fmt 11.1.4 succeeds with MSVC v141 on GitHub Actions of this repo, but it fails in my local environment with the following error.

format.cc
fmt\include\fmt\format.h(3853): error C2752: 'fmt::v11::formatter<unsigned int,char,void>': more than one partial specialization matches the template argument list
fmt\include\fmt\format.h(3853): note: could be 'fmt::v11::formatter<T,Char,std::enable_if<fmt::v11::detail::type_constant<T,Char>::value!=,void>::type>'
fmt\include\fmt\format.h(3853): note: or       'fmt::v11::formatter<T,Char,void>'

System

Error:

  • Visual Studio 2017 (Version 15.9.71) with MSVC v141
  • Visual Studio 2022 (Version 17.13.6) with MSVC v141

OK:

  • Visual Studio 2022 (Version 17.13.6) with MSVC v142 or v143

(Others conditions: x86 or x64, C++ 14 or 17, release or debug)

Step to reproduce

Build this solution: fmt.zip.

Remarks

  • This error can be fixed by hirohira9119@90b80f0.
    Since there is no constant that specifies the platform toolset version, the fix targets all versions of MSVC.
@vitaut
Copy link
Contributor

vitaut commented Apr 14, 2025

Could you submit a PR with your workaround?

@hirohira9119
Copy link
Contributor Author

Thank you for checking. I’ve submitted it.

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

Successfully merging a pull request may close this issue.

2 participants