Combining predicates in a functional way
问题 Does Boost Hana provide a way to combine predicates with logical operators? I'm referring to something roughly like this constexpr auto both = [](auto&& f, auto&& g){ return [&f,&g](auto&& x){ return f(x) && g(x); }; }; that could be used like this: int main() { std::vector<int> v{1,2,3,4,5,6,7,8,9,10}; auto less_than_7 = hana::reverse_partial(std::less_equal<int>{}, 7); auto more_than_3 = hana::reverse_partial(std::greater_equal<int>{}, 3); auto r = ranges::views::remove_if(v, both(less_than