From 46c4e8a51723e954d5a1753d7e1f647c20ca536e Mon Sep 17 00:00:00 2001 From: Ilya Popov Date: Fri, 23 Jun 2023 16:58:51 +0200 Subject: [PATCH] Remove usages of old style cast, use static_cast instead This silences compiler warnings generated by GCC --- include/boost/mp11/algorithm.hpp | 2 +- include/boost/mp11/detail/mp_map_find.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 75299fb..be377f5 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -309,7 +309,7 @@ template class L, class... T, template class L2, cl { template static mp_identity> f( U*..., mp_identity*... ); - using R = decltype( f( (mp_identity*)0 ... ) ); + using R = decltype( f( static_cast*>(0) ... ) ); using type = typename R::type; }; diff --git a/include/boost/mp11/detail/mp_map_find.hpp b/include/boost/mp11/detail/mp_map_find.hpp index 5ba58a4..2fb70d8 100644 --- a/include/boost/mp11/detail/mp_map_find.hpp +++ b/include/boost/mp11/detail/mp_map_find.hpp @@ -74,7 +74,7 @@ template class M, class... T, class K> struct mp_map_find_imp template class L, class... U> static mp_identity> f( mp_identity>* ); static mp_identity f( ... ); - using type = mpmf_unwrap< decltype( f((U*)0) ) >; + using type = mpmf_unwrap< decltype( f( static_cast(0) ) ) >; }; } // namespace detail