From b4640d64d8d9f15e4599e09f11ffa13406d60ff4 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 28 Jul 2016 14:14:15 +1000 Subject: [PATCH] format: use const-ref over rval-ref for value params --- format.ipp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/format.ipp b/format.ipp index c740e1c8..33d53e65 100644 --- a/format.ipp +++ b/format.ipp @@ -856,7 +856,7 @@ namespace util { namespace format { namespace detail { //------------------------------------------------------------------------ template OutputT - _render (OutputT os, const char *first, const char *last, ValueT val, Args&& ...args) + _render (OutputT os, const char *first, const char *last, const ValueT &val, const Args &...args) { auto start = std::find (first, last, '%'); os = std::copy (first, start, os); @@ -865,14 +865,14 @@ namespace util { namespace format { namespace detail { specifier spec; auto cursor = parse (start, last, spec); - return _render (write (os, spec, val), cursor, last, std::forward (args)...); + return _render (write (os, spec, val), cursor, last, args...); } //------------------------------------------------------------------------ template OutputT - render (OutputT os, const char (&fmt)[N], ValueT val, Args&& ...args) + render (OutputT os, const char (&fmt)[N], const ValueT &val, const Args &...args) { if (N <= 1) return os; @@ -880,7 +880,7 @@ namespace util { namespace format { namespace detail { const auto first = fmt; const auto last = fmt + N - 1; - return _render (os, first, last, val, std::forward (args)...); + return _render (os, first, last, val, args...); }