Commit c75f6dcd authored by Tomek Rozen's avatar Tomek Rozen Committed by Jonathan Müller

Changing ArgArray template argument from unsigned to size_t

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 e14bac62)
parent ecd0994c
......@@ -2157,10 +2157,10 @@ inline uint64_t make_type(const T &arg) {
return MakeValue< BasicFormatter<char> >::type(arg);
}
template <unsigned N, bool/*IsPacked*/= (N < ArgList::MAX_PACKED_ARGS)>
template <std::size_t N, bool/*IsPacked*/= (N < ArgList::MAX_PACKED_ARGS)>
struct ArgArray;
template <unsigned N>
template <std::size_t N>
struct ArgArray<N, true/*IsPacked*/> {
typedef Value Type[N > 0 ? N : 1];
......@@ -2178,7 +2178,7 @@ struct ArgArray<N, true/*IsPacked*/> {
}
};
template <unsigned N>
template <std::size_t N>
struct ArgArray<N, false/*IsPacked*/> {
typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment