From e14bac62a0211857d2265081ecaa88dab1a97803 Mon Sep 17 00:00:00 2001 From: Tomek Rozen Date: Mon, 15 May 2017 10:48:49 +0200 Subject: [PATCH] Changing ArgArray template argument from unsigned to size_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each instantiation of ArgArray template uses sizeof operator, which returns a std::size_t value. GCC 7.1 warns about invalid conversion (error: conversion to ‘unsigned int’ from ‘long unsigned int’ may alter its value [-Werror=conversion]). --- fmt/format.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fmt/format.h b/fmt/format.h index 3f011661..b56b8589 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -2214,10 +2214,10 @@ inline uint64_t make_type(const T &arg) { return MakeValue< BasicFormatter >::type(arg); } -template +template struct ArgArray; -template +template struct ArgArray { typedef Value Type[N > 0 ? N : 1]; @@ -2235,7 +2235,7 @@ struct ArgArray { } }; -template +template struct ArgArray { typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE