From c75f6dcd3090d61f002f59ab7ee43d3e90105e9e 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]). (cherry picked from commit e14bac62a0211857d2265081ecaa88dab1a97803) --- fmt/format.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fmt/format.h b/fmt/format.h index c2a4275a..68892d80 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -2157,10 +2157,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]; @@ -2178,7 +2178,7 @@ struct ArgArray { } }; -template +template struct ArgArray { typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE