From: Sergey Semushin Date: Sat, 11 Jun 2022 17:42:35 +0000 (+0300) Subject: build: Fix build with newer MSVC 2022 versions (#1093) X-Git-Tag: v4.7~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e410c7870c8d2d68fdcf17f31d40da078c7690e;p=thirdparty%2Fccache.git build: Fix build with newer MSVC 2022 versions (#1093) --- diff --git a/src/core/exceptions.hpp b/src/core/exceptions.hpp index a9b70b588..1171b07ac 100644 --- a/src/core/exceptions.hpp +++ b/src/core/exceptions.hpp @@ -43,7 +43,7 @@ public: Error(const std::string& message); // `args` are forwarded to `fmt::format`. - template inline Error(T&&... args); + template inline Error(const char* format, T&&... args); }; inline Error::Error(const std::string& message) : ErrorBase(message) @@ -51,8 +51,8 @@ inline Error::Error(const std::string& message) : ErrorBase(message) } template -inline Error::Error(T&&... args) - : ErrorBase(fmt::format(std::forward(args)...)) +inline Error::Error(const char* format, T&&... args) + : ErrorBase(fmt::format(format, std::forward(args)...)) { } @@ -65,7 +65,7 @@ public: Fatal(const std::string& message); // `args` are forwarded to `fmt::format`. - template inline Fatal(T&&... args); + template inline Fatal(const char* format, T&&... args); }; inline Fatal::Fatal(const std::string& message) : ErrorBase(message) @@ -73,8 +73,8 @@ inline Fatal::Fatal(const std::string& message) : ErrorBase(message) } template -inline Fatal::Fatal(T&&... args) - : ErrorBase(fmt::format(std::forward(args)...)) +inline Fatal::Fatal(const char* format, T&&... args) + : ErrorBase(fmt::format(format, std::forward(args)...)) { }