Skip to content

Build error with MSVC v141 #4412

Description

@hirohira9119

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions