Return a Tuple of Pointers Pointing to GPU Memory

I am designing some APIs to allocate memory for DoA (data structure of arrays). One of the tasks is given a set of pointers and a size, how to allocate memory using cuda::std::tuple. I am having the following thinking to compile recursively for such a design:

template <typename IndexType, typename DataType>
cuda::std::tuple<DataType*> alloc_dev_mem_to_tuple(const IndexType num)
{
  // some code to get a memory pool dm

  DataType* ptr = dm->allocate(num * sizeof(DataType));
  return cuda::std::make_tuple(ptr);
}


template <typename IndexType, typename... DataTypes>
cuda::std::tuple<DataTypes*...> alloc_dev_mem_to_tuple(const IndexType num)
{
  
}

However, it seems to me that this API is problematic from C++ perspective, as C++ functions are differentiated based on parameter list, not return type. How to implement such an idea then?

That is not really a CUDA specific question. Below code works on compiler explorer using c++17.

#include <tuple>
#include <iostream>

#include <cuda/std/tuple>

template<class T>
T* allocate(size_t n){
    T* ptr;
    cudaMalloc(&ptr, sizeof(T) * n);
    return ptr;
}

template<class... T>
cuda::std::tuple<T*...> allocate_tuple_of_pointers(size_t n){
    return cuda::std::make_tuple(allocate<T>(n) ... );
}



int main(){
    auto tuple = allocate_tuple_of_pointers<int, float, char>(10);

    std::cout << (void*)cuda::std::get<0>(tuple) << " " << (void*)cuda::std::get<1>(tuple) << " " << (void*)cuda::std::get<2>(tuple) << "\n";
}