diff --git a/thrust/detail/type_traits.h b/thrust/detail/type_traits.h index 9bfe60d31..c663cffb0 100644 --- a/thrust/detail/type_traits.h +++ b/thrust/detail/type_traits.h @@ -391,22 +391,44 @@ template // mpl stuff +template + struct or_; -template - struct or_ +template <> + struct or_<> : public integral_constant< bool, - Condition1::value || Condition2::value || Condition3::value || Condition4::value || Condition5::value || Condition6::value || Condition7::value || Condition8::value || Condition9::value || Condition10::value + false_type::value // identity for or_ > { }; // end or_ -template - struct and_ - : public integral_constant +template + struct or_ + : public integral_constant< + bool, + Condition::value || or_::value + > +{ +}; // end or_ + +template + struct and_; + +template<> + struct and_<> + : public integral_constant< + bool, + true_type::value // identity for and_ + > +{ +}; // end and_ + +template + struct and_ + : public integral_constant< + bool, + Condition::value && and_::value> { }; // end and_