|
Boost Users : |
Subject: Re: [Boost-users] [variant] declaring recursive variants
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-11-15 21:27:23
AMDG
On 11/15/2011 06:10 PM, Jerry Jeremiah wrote:
> 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?
>
Wrap it in a struct and forward declare
the struct.
In Christ,
Steven Watanabe
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