// PR c++/70685 // { dg-do compile { target c++14 } } namespace std { template struct A { static constexpr _Tp value = __v; }; typedef A false_type; template using conditional_t = _Iftrue; namespace hana { template struct is_default : false_type {}; template struct tag_of; struct deleted_implementation; namespace detail { namespace operators { template struct adl {}; } } template struct B; template struct G : std::A {}; template G integral_c; template using int_ = G; template int_ int_c; template struct C; template struct D { template auto operator()(X... x) { return C::apply(x...); } }; template D make; template struct unpack_impl; struct Foldable { using Tag = int; static constexpr int value = is_default>::value; }; struct range_tag; auto make_range = make; template struct sum_impl; template struct F; template > F sum; template struct range : detail::operators::adl> {}; template struct tag_of> { using type = range_tag; }; template <> struct C { template static auto apply(From, To) { using T = int; constexpr T from(From::value); constexpr T to(To::value); return range{}; } }; template <> struct sum_impl { template static constexpr I sum_helper(I m, I n) { if (m == n) return 0; return sum_helper(0, 0); } template static auto apply(range) { integral_c; } }; template struct F { template auto operator()(Xs xs) { using S = typename tag_of::type; using Sum = conditional_t, deleted_implementation>; Sum::apply(xs); } }; } auto __hana_tmp_22 = (hana::sum<>(hana::make_range(hana::int_c<-3>, hana::int_c<-2>)), hana::sum<>(hana::make_range(hana::int_c<3>, hana::int_c<7>)), hana::int_c<6>); }