1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef FUSION_AND_07152016_1625
- #define FUSION_AND_07152016_1625
- #include <boost/config.hpp>
- #include <boost/config/workaround.hpp>
- #include <boost/type_traits/integral_constant.hpp>
- #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- #error fusion::detail::and_ requires variadic templates
- #endif
- namespace boost { namespace fusion { namespace detail {
- #if defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS) \
- || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1913))
- template<typename ...Cond>
- struct and_impl : false_type {};
- template<typename ...T>
- struct and_impl<integral_constant<T, true>...> : true_type {};
-
- template<bool ...Cond>
- struct and_impl1 : and_impl<integral_constant<bool, Cond>...> {};
-
- template<typename ...Cond>
- struct and_ : and_impl1<Cond::value...> {};
- #else
- template <typename ...Cond>
- struct and_ : integral_constant<bool, ((bool)Cond::value && ...)> {};
- #endif
- }}}
- #endif
|