From c61b1e350845ba9b12201768945379dc2e716e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 31 Dec 2021 00:59:41 +0100 Subject: [PATCH] Fix some -Wsign-conversion warnings --- include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp | 2 +- include/boost/mpl/aux_/template_arity.hpp | 2 +- include/boost/mpl/aux_/yes_no.hpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp index daec4b8..bb568f6 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -12,7 +12,7 @@ namespace boost { namespace mpl { namespace aux { template< int N > struct arity_tag { - typedef char (&type)[N + 1]; + typedef char (&type)[(unsigned)N + 1]; }; template< diff --git a/include/boost/mpl/aux_/template_arity.hpp b/include/boost/mpl/aux_/template_arity.hpp index f011159..f77761b 100644 --- a/include/boost/mpl/aux_/template_arity.hpp +++ b/include/boost/mpl/aux_/template_arity.hpp @@ -65,7 +65,7 @@ namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag { - typedef char (&type)[N + 1]; + typedef char (&type)[(unsigned)N + 1]; }; # define AUX778076_MAX_ARITY_OP(unused, state, i_) \ diff --git a/include/boost/mpl/aux_/yes_no.hpp b/include/boost/mpl/aux_/yes_no.hpp index 21a18a2..2fdda93 100644 --- a/include/boost/mpl/aux_/yes_no.hpp +++ b/include/boost/mpl/aux_/yes_no.hpp @@ -18,6 +18,7 @@ #include #include #include +#include namespace boost { namespace mpl { namespace aux { @@ -36,7 +37,7 @@ template<> struct yes_no_tag }; -template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag +template< BOOST_MPL_AUX_NTTP_DECL(std::size_t, n) > struct weighted_tag { #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) typedef char (&type)[n];