I have a member variable of a class, offsets, which is a vector with at leastN+1 elements. I would like to create a member function which will return a tuple with N entries with values of successive elements of the vector divided by each other. An example is shown below for a specific instance of this function when N=3.
std::tuple<3> get_shape()
{
return std::make_tuple(offsets[N]/offsets[N-1], offsets[N-1]/offsets[N-2], offsets[N-2]/offsets[N-3]);
}
Is there a way that this sequence can be generalized to implement the function std::tuple<N> get_shape()?