|
Boost Users : |
Subject: Re: [Boost-users] [Variant] Tree like structure with variant
From: Bryce Lelbach (admin_at_[hidden])
Date: 2010-10-21 06:19:03
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Might I interest you in some Prana?
http://github.com/brycelelbach/prana
http://thread.gmane.org/gmane.comp.parsers.spirit.general/20853
Not done yet, but it should be in a usable state soon.
On Thu, 21 Oct 2010 10:39:50 +0200
dariomt_at_[hidden] wrote:
> 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.
- --
Bryce Lelbach aka wash
http://groups.google.com/group/ariel_devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkzAE5cACgkQO/fqqIuE2t6/2ACgk1Aw/TnQjWcIgolfRDVZ1KXQ
5kYAoOrsWDAtRt99gihClUgz9T/A31hm
=99z5
-----END PGP SIGNATURE-----
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net