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} {}