diff --git a/cgmanifest.json b/cgmanifest.json index 6205ba258d..1f3d56dffc 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -17,9 +17,9 @@ "Type": "other", "other": { "name": "fmt", - "version": "10.1.0", - "downloadUrl": "https://github.com/fmtlib/fmt/archive/refs/tags/10.1.0.tar.gz", - "hash": "69a7b8584f828528e3bb4b87153449e96df29bd740adcd42a2e3d50ae4a270c80a5eb2c3057337048be5b978094d8bb73bec3378e3b6370748de2b063dd0aa4b" + "version": "11.0.2", + "downloadUrl": "https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz", + "hash": "47ff6d289dcc22681eea6da465b0348172921e7cafff8fd57a1540d3232cc6b53250a4625c954ee0944c87963b17680ecbc3ea123e43c2c822efe0dc6fa6cef3" } }, "DevelopmentDependency": false, diff --git a/cmake/Findfmt.cmake b/cmake/Findfmt.cmake index c01e9b6170..c1d75825dc 100644 --- a/cmake/Findfmt.cmake +++ b/cmake/Findfmt.cmake @@ -9,7 +9,7 @@ if("$CACHE{VCPKG_FMT_URL}" MATCHES "^https://github.com/fmtlib/fmt/archive/refs/ unset(VCPKG_FMT_URL CACHE) # Fix upgrade endif() if(NOT VCPKG_FMT_URL) - set(VCPKG_FMT_URL "https://github.com/fmtlib/fmt/archive/refs/tags/10.1.0.tar.gz") + set(VCPKG_FMT_URL "https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz") endif() if(POLICY CMP0135) @@ -20,11 +20,8 @@ set(OLD_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(SKIP_WARNINGS OFF) if(MSVC AND VCPKG_DEVELOPMENT_WARNINGS AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")) set(SKIP_WARNINGS ON) - # fmt\core.h(418): warning C6239: ( && ) always evaluates to the result of : Did you intend to use the bitwise-and (&) operator? If not, consider removing the redundant '' and the && operator. + # fmt\base.h(451): warning C6239: ( && ) always evaluates to the result of : Did you intend to use the bitwise-and (`&`) operator? If not, consider removing the redundant '' and the `&&` operator. string(APPEND CMAKE_CXX_FLAGS " /wd6239") - # This one is guarded by an assert - # fmt\format-inl.h(327): warning C6385: Reading invalid data from 'pow10_significands'.: Lines: 298, 300, 327 - string(APPEND CMAKE_CXX_FLAGS " /wd6385") # fmt\os.h(377): warning C6326: Potential comparison of a constant with another constant. string(APPEND CMAKE_CXX_FLAGS " /wd6326") endif() @@ -33,7 +30,7 @@ include(FetchContent) FetchContent_Declare( fmt URL "${VCPKG_FMT_URL}" - URL_HASH "SHA512=69a7b8584f828528e3bb4b87153449e96df29bd740adcd42a2e3d50ae4a270c80a5eb2c3057337048be5b978094d8bb73bec3378e3b6370748de2b063dd0aa4b" + URL_HASH "SHA512=47ff6d289dcc22681eea6da465b0348172921e7cafff8fd57a1540d3232cc6b53250a4625c954ee0944c87963b17680ecbc3ea123e43c2c822efe0dc6fa6cef3" ) if(NOT fmt_FIND_REQUIRED) diff --git a/include/vcpkg/base/fmt.h b/include/vcpkg/base/fmt.h index 55ce1cb8b6..416e6dcd38 100644 --- a/include/vcpkg/base/fmt.h +++ b/include/vcpkg/base/fmt.h @@ -9,9 +9,12 @@ VCPKG_MSVC_WARNING(push) // C6239 is not a useful warning for external code; it is // ( && ) always evaluates to the result of . // -// include\fmt\format.h(1812): warning C4189: 'zero': local variable is initialized but not referenced -// include\fmt\compile.h(151): warning C4702: unreachable code (expected due to if constexpr) -VCPKG_MSVC_WARNING(disable : 6239 4189 4702) +// fmt\base.h(451): warning C6239: ( && ) always evaluates to the result of +// Did you intend to use the bitwise-and (`&`) operator? If not, consider removing the redundant '' +// and the `&&` operator. +// include\fmt\compile.h(153): warning C4702: unreachable code (expected due to if constexpr) +VCPKG_MSVC_WARNING(disable : 6239 4702) #include #include +#include VCPKG_MSVC_WARNING(pop) diff --git a/include/vcpkg/base/fwd/fmt.h b/include/vcpkg/base/fwd/fmt.h index f13d54076f..7ffae1bfaa 100644 --- a/include/vcpkg/base/fwd/fmt.h +++ b/include/vcpkg/base/fwd/fmt.h @@ -2,7 +2,7 @@ namespace fmt { - inline namespace v10 + inline namespace v11 { template struct formatter; diff --git a/include/vcpkg/base/stringview.h b/include/vcpkg/base/stringview.h index 40b9a5e110..59650c4f5c 100644 --- a/include/vcpkg/base/stringview.h +++ b/include/vcpkg/base/stringview.h @@ -105,6 +105,12 @@ namespace vcpkg }; } +template +struct fmt::range_format_kind + : std::integral_constant +{ +}; + template struct fmt::formatter : fmt::formatter, Char, void> { @@ -115,5 +121,18 @@ struct fmt::formatter : fmt::formatter +struct fmt::range_format_kind + : std::integral_constant +{ +}; + VCPKG_FORMAT_AS(vcpkg::ZStringView, vcpkg::StringView); + +template +struct fmt::range_format_kind + : std::integral_constant +{ +}; + VCPKG_FORMAT_AS(vcpkg::StringLiteral, vcpkg::StringView);