
21 Oct
2010
21 Oct
'10
8:39 a.m.
Hi all, I need a tree-like structure like the following boost::variant< int, std::vector<tree>, std::map<std::string, tree> > tree; So, my tree can have an int, or a list of trees, or a map of trees. Of course this is not possible, and I've been trying to use boost::recursive_wrapper. I have looked at the example in the documentation, but and I'm not able to achieve what I want. My feeling is that I'm missing an extra 'node' level somewhere, but since all the types I'm using are typedefs, I cannot forward delcare it to break the cyclic reference... I would appreciate help with this. Thanks in advance.