From 3e410c7870c8d2d68fdcf17f31d40da078c7690e Mon Sep 17 00:00:00 2001 From: Sergey Semushin Date: Sat, 11 Jun 2022 20:42:35 +0300 Subject: [PATCH] build: Fix build with newer MSVC 2022 versions (#1093) --- src/core/exceptions.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)...)) { } -- 2.47.3