Boost logo

Boost Users :

Subject: Re: [Boost-users] [Variant] recursive_wrapper and ambiguous convert_construct()
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-04-09 16:09:37


On 04/09/12 10:48, Florian Goujeon wrote:
> Hello,
>
> I'm modelizing a syntax tree using boost::variant, std::tuple and
> std::vector. This syntax tree has a lot of cyclic dependencies, so I have
> to use boost::recursive_wrapper along with forward declarations.
>
> I've encountered a case that my compiler (GCC 4.7) refuses to build.
> Here is the source code: http://pastebin.com/3a5xU06x (it's pretty short)
Hi Florian,

My brief look at your code puzzled me.
I couldn't understand the purpose of a variant with only
one member. I thought a variant was a tagged union where
the value held in the tagged union was one of a set of
types; yet, since there's only one type in the set, I can't
fathom the reason for using a variant.

Could you explain a bit?

-regards,
Larry


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