File indexing completed on 2025-01-18 09:34:43
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef FUSION_AND_07152016_1625
0009 #define FUSION_AND_07152016_1625
0010
0011 #include <boost/config.hpp>
0012 #include <boost/config/workaround.hpp>
0013 #include <boost/type_traits/integral_constant.hpp>
0014
0015 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0016 #error fusion::detail::and_ requires variadic templates
0017 #endif
0018
0019 namespace boost { namespace fusion { namespace detail {
0020 #if defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS) \
0021 || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1913))
0022 template<typename ...Cond>
0023 struct and_impl : false_type {};
0024
0025 template<typename ...T>
0026 struct and_impl<integral_constant<T, true>...> : true_type {};
0027
0028
0029 template<bool ...Cond>
0030 struct and_impl1 : and_impl<integral_constant<bool, Cond>...> {};
0031
0032
0033
0034
0035
0036
0037
0038
0039 template<typename ...Cond>
0040 struct and_ : and_impl1<Cond::value...> {};
0041 #else
0042 template <typename ...Cond>
0043 struct and_ : integral_constant<bool, ((bool)Cond::value && ...)> {};
0044 #endif
0045 }}}
0046
0047 #endif