Boost logo

Boost Users :

Subject: [Boost-users] [variant] declaring recursive variants
From: Jerry Jeremiah (jerry.jeremiah_at_[hidden])
Date: 2011-11-15 21:10:55


>

Hello,

Actually, I don't want a recursive variant in the normal recursive_wrapper
sense. What I want is this:

typedef std::list<a> alist;
typedef std::list<b> blist;
typedef boost::variant<std::string
                      ,long double
                      ,alist::iterator
                      ,blist::iterator
                      ,config::iterator
> var;
typedef std::vector<var> value;
typedef std::map<std::string,value> message;
typedef std::map<std::string,message> config;

But of course I can't do that because I have no idea how to forward declare
config. I suspect that there is no way to do this, but I am not in the same
league as everybody else when it comes to this stuff.

Any suggestions?

Thank you,

Jerry


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