#pragma once #include #include #include #include #include #include namespace utl { namespace mp { namespace __impl { struct greater_t { template constexpr auto operator()(const L& l, const R& r) const; }; } constexpr __impl::greater_t greater { }; namespace __impl { template struct greater_impl : greater_impl> { }; template struct greater_impl> : default_ { template static constexpr auto apply(X&& x, Y&& y) { return less(static_cast(y), static_cast(x)); } }; template constexpr auto greater_t::operator()(const L& l, const R& r) const { using l_tag_type = tag_of; using r_tag_type = tag_of; using greater_impl_type = greater_impl; return greater_impl_type::apply(l, r); } } } }