Use fold expression to improbe compile speed

This commit is contained in:
Kohei Takahashi
2018-03-14 14:53:07 +09:00
parent 4734cf4a13
commit 2aea153be0

View File

@ -15,6 +15,7 @@
#endif
namespace boost { namespace fusion { namespace detail {
#if defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS)
template<typename ...Cond>
struct and_impl : false_type {};
@ -34,6 +35,10 @@ namespace boost { namespace fusion { namespace detail {
recursive. */
template<typename ...Cond>
struct and_ : and_impl1<Cond::value...> {};
#else
template <typename ...Cond>
struct and_ : integral_constant<bool, ((bool)Cond::value && ...)> {};
#endif
}}}
#endif // FUSION_AND_07152016_1625