From ad71f5a70652cf1cdab7bc43863d6af3341eb9c3 Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sat, 27 Jul 2019 17:55:21 -0400 Subject: [PATCH] Use forwarding references in UDL template --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 23d46d07..750677d0 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3455,13 +3455,13 @@ namespace internal { template class udl_formatter { public: template - std::basic_string operator()(const Args&... args) const { + std::basic_string operator()(Args&&... args) const { FMT_CONSTEXPR_DECL Char s[] = {CHARS..., '\0'}; FMT_CONSTEXPR_DECL bool invalid_format = do_check_format_string( basic_string_view(s, sizeof...(CHARS))); (void)invalid_format; - return format(s, args...); + return format(s, std::forward(args)...); } }; # else