From 3214fe1e46888050a9d3e0cc8121a275f6b333cf Mon Sep 17 00:00:00 2001 From: jamboree Date: Tue, 9 Jun 2015 18:29:32 +0800 Subject: [PATCH] Fix MakeValue --- format.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/format.h b/format.h index 0441a1ac..d02b2d4f 100644 --- a/format.h +++ b/format.h @@ -970,9 +970,12 @@ class MakeValue : public Arg { return IsConvertibleToInt::value ? Arg::INT : Arg::CUSTOM; } - MakeValue(const NamedArg &value) { pointer = &value; } + // Additional template param `Char_` is needed here because make_type always uses MakeValue. + template + MakeValue(const NamedArg &value) { pointer = &value; } - static uint64_t type(const NamedArg &) { return Arg::NAMED_ARG; } + template + static uint64_t type(const NamedArg &) { return Arg::NAMED_ARG; } }; template