From 4769e70056a8eb3109ca8e94033b61a9b26f4125 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 18 Jun 2023 16:24:14 +0000 Subject: [PATCH] another fix to message wrapper --- include/spdlog/common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index e86eb837..d7a63fb7 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -189,8 +189,9 @@ private: template struct message_wrapper { - message_wrapper(const T &msg, details::source_location loc = details::source_location::current()) - : msg_{msg} + template + message_wrapper(U&& msg, details::source_location loc = details::source_location::current()) + : msg_{std::forward(msg)} , loc_{loc} {}