This is not possible without any outside help; generic lambdas is the only form of pattern allowed within the scope, and they cannot be specialized or overloaded (without any external helper, such as P0051R1 overload ).
, , () (b)
[&](auto&& g) {
g(g, std::integral_constant<std::size_t, 0u>{});
}([&](auto&& g, auto I) {
h(std::get<I>(t), std::get<I>(u));
std::get<I + 1 == sizeof...(T)>(std::make_pair(
[&](auto&& g) { g(g, std::integral_constant<std::size_t, I + 1>{}); },
[](auto&&){}))(g);
});
.
(std::index_sequence_for), ? :
template<class F, std::size_t... I> auto apply_indexes(F&& f, std::index_sequence<I...>) {
return std::forward<F>(f)(std::integral_constant<std::size_t, I>{}...);
}
:
auto g = [&](auto... I)
{
bool const r[]{((void)h(std::get<I>(t), std::get<I>(u)), false)...};
(void)r;
};
apply_indexes(g, std::index_sequence_for<T...>());