]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/mp11/function.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / mp11 / function.hpp
index 1aeccac4ef51b858148af6ad948ec94a228cf4ed..e20b45200a1b9e79e653343ac18cfe81dbd2af37 100644 (file)
@@ -85,13 +85,9 @@ template<class... T> using mp_and = typename detail::mp_and_impl<mp_list<T...>>:
 
 template<class... T> using mp_all = mp_bool< mp_count_if< mp_list<T...>, mp_not >::value == 0 >;
 
-#elif defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS )
-
-template<class... T> using mp_all = mp_bool<(static_cast<bool>(T::value) && ...)>;
-
 #else
 
-template<class... T> using mp_all = mp_and<mp_to_bool<T>...>;
+template<class... T> using mp_all = mp_bool< mp_count< mp_list<mp_to_bool<T>...>, mp_false >::value == 0 >;
 
 #endif
 
@@ -127,13 +123,13 @@ template<class T1, class... T> struct mp_or_impl<T1, T...>
 
 // mp_any<T...>
 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86356
-#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) && !BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, != 0 ) && !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 )
+#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 ) || BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, != 0 )
 
-template<class... T> using mp_any = mp_bool<(static_cast<bool>(T::value) || ...)>;
+template<class... T> using mp_any = mp_bool< mp_count_if< mp_list<T...>, mp_to_bool >::value != 0 >;
 
 #else
 
-template<class... T> using mp_any = mp_bool< mp_count_if< mp_list<T...>, mp_to_bool >::value != 0 >;
+template<class... T> using mp_any = mp_bool< mp_count< mp_list<mp_to_bool<T>...>, mp_true >::value != 0 >;
 
 #endif
 
@@ -150,7 +146,7 @@ template<> struct mp_same_impl<>
 
 template<class T1, class... T> struct mp_same_impl<T1, T...>
 {
-    using type = mp_all<std::is_same<T1, T>...>;
+    using type = mp_bool< mp_count<mp_list<T...>, T1>::value == sizeof...(T) >;
 };
 
 } // namespace detail