From ae4c83c8a6ad40ba82b6682bf92bde70ad5c49d3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 23 Mar 2021 02:55:45 +0200 Subject: [PATCH] Implement mp_all in terms of mp_count --- include/boost/mp11/function.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index b0b4750..162bf29 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -85,13 +85,9 @@ template using mp_and = typename detail::mp_and_impl>: template using mp_all = mp_bool< mp_count_if< mp_list, mp_not >::value == 0 >; -#elif defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) - -template using mp_all = mp_bool<(static_cast(T::value) && ...)>; - #else -template using mp_all = mp_and...>; +template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; #endif