I am looking for something like:
pair<int, pair<int, ...>*>*> p;
Is it possible to declare such pair? Is there already a data structure for this?
CodePudding user response:
struct A
{
std::pair<int, A *> p;
};
You could also inherit from the pair, but I wouldn't do it to keep the code simpler.