Suppose I have a type that I will name NamedNestedMap
std::map<std::string, std::map<std::string, NamedNestedMap> >
In this case, each second (value) of the pair has the same type or type as the parent. I cannot figure out how to announce this. This will allow the recursive algorithm to descend through the map tree.
The type of the value matches the type of the parent, which at the point where I need to refer is not fully declared.
How do you declare something nested like this ...
I can’t even print the first one so that I can turn it on the second because it is incomplete
A recursion will look for something on the map when it finds it, a recursion on the value of this object. Part of the algorithm looks pretty straightforward, part of the declaration is here. I am not trying to iterate over a map of maps, just use map.find, recurse and use map.find again.
source share