c++ – splitting a tuple into N-element tuples

This nice hack should allow you to split a tuple into N-element tuples, thereby effectively splitting a tuple into pairs, triples, … For example, this allows you to split an input parameter pack, into N-element tuples. Your thoughts?

template <std::size_t N>
constexpr auto split(auto&& t) noexcept
{
  static_assert(std::tuple_size_v<std::remove_cvref_t<decltype(t)>> &&
    !(std::tuple_size_v<std::remove_cvref_t<decltype(t)>> % N));
  return (&)<auto ...I>(std::index_sequence<I...>) noexcept
    {
      return std::make_tuple((&)<auto K, auto ...J>(
        std::index_sequence<J...>) noexcept
        {
          return std::forward_as_tuple(std::get<K + J>(
            std::forward<decltype(t)>(t))...);
        }.template operator()<N * I>(std::make_index_sequence<N>())...
      );
    }(std::make_index_sequence<std::tuple_size_v<
      std::remove_cvref_t<decltype(t)>> / N>());
}

Usage:

auto foo(auto&& ...a)
{
  auto const f((&)(auto&&, auto&&)
    {
    }
  );

  return std::apply((&)(auto&& ...t)
    {
      return (std::apply(f, std::forward<decltype(t)>(t)), ...);
    },
    split<2>(std::forward_as_tuple(a...))
  );
}