#ifndef BOOST_MP11_FUNCTION_HPP_INCLUDED #define BOOST_MP11_FUNCTION_HPP_INCLUDED // Copyright 2015, 2016 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #include #include #include namespace boost { // mp_equal_to template using mp_equal_to = mp_bool< T1::value == T2::value >; // mp_all template using mp_all = mp_bool< mp_count_if< mp_list, mp_to_bool >::value == sizeof...(T) >; // mp_and namespace detail { template struct mp_and_impl; } // namespace detail template using mp_and = typename detail::mp_and_impl::type; namespace detail { template<> struct mp_and_impl<> { using type = mp_true; }; template struct mp_and_impl { using type = mp_eval_if< mp_not, mp_false, mp_and, T... >; }; } // namespace detail // mp_any template using mp_any = mp_bool< mp_count_if< mp_list, mp_to_bool >::value != 0 >; // mp_or namespace detail { template struct mp_or_impl; } // namespace detail template using mp_or = typename detail::mp_or_impl::type; namespace detail { template<> struct mp_or_impl<> { using type = mp_false; }; template struct mp_or_impl { using type = mp_eval_if< T1, mp_true, mp_or, T... >; }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_MP11_FUNCTION_HPP_INCLUDED