From 7f96af5eef73b667a1eb7d0f4e5d68211aecc19c Mon Sep 17 00:00:00 2001 From: Jamboree Date: Sat, 6 Jun 2015 13:20:30 +0800 Subject: [PATCH] Suppress MSVC warning --- format.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/format.h b/format.h index f1c129ff..a9007de9 100644 --- a/format.h +++ b/format.h @@ -773,6 +773,11 @@ struct NamedArg { T const& arg; NamedArg(BasicStringRef name, T const& arg) : name(name), arg(arg) {} + +private: + + // Suppress MSVC warning : assignment operator could not be generated + NamedArg& operator=(const NamedArg&); }; // A formatting argument. It is a POD type to allow storage in @@ -1559,7 +1564,7 @@ struct ArgArray { }; template -inline void add_named_arg(NameIndexPair* map, T const&, unsigned) {} +inline void add_named_arg(NameIndexPair*, const T &, unsigned) {} template inline void add_named_arg(NameIndexPair*& map, const NamedArg &namedArg, unsigned n) {