Is there a way to have the same template that can handle n (variable)-nested loops ?
for example :
for (auto & node : mnodes) {
for (auto & parent : node->parents) {
\\ do something
}
}
for (auto & tree : mtrees) {
for (auto & branch : tree->mbranches) {
for(auto & root : branch ->roots ) {
\\ do something
}
}
}
The parameters of the outer and inner loops are always different and the number of the inner loops is different too.