I have a bunch of related indicies in a kind of templated hierarchy, looking something like
template <int level>
struct index{
index<level - 1> w;
int x, y;
};
template <> struct index<0> { int x, y; };
template <int level>
struct data;
and a class that's supposed to generate and cache objects indexed by them. I want to use pimpl for this class, and I'm wondering if there's a way to forward the function calls to the implementation class using templates. Something like
class Cache{
template <int level>
shared_ptr<data<level>> get_data(const index<level> & index);
};