x3::variant vs boost::variant

Baptiste Wicht <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hi guys,

I just tested compiling my X3 parser with Boost 1.59 and it worked like
a charm :)

Now, I'll start using my real AST instead of the nodes I've written to
test X3.

I'm having a problem at this point with variant types. My old AST use
boost::variant and recursive_wrapper while my new AST use x3::variant
and forward_ast.

The new way (especially getting rid of recursive_wrapper) is nicer in my
opinion, so I tried adapting my tree to use x3::variant and forward_ast,
but it seems that a lot of code will need to be changed :( I found at
least issues with operator<< (easily fixable). And apparently you cannot
construct a x3::variant<x1,x2> from a x2. That seems really extreme
since I'm doing that all over the place with boost::variant.

It seems that X3 don't mind boost::variant and recursive_wrapper, so
what would be the advantages of using x3::variant and forward_ast ?

Thanks

Baptiste

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJWrIFWAAoJEMVWa2x/iEUyiYwP/j/MhblJG+Zzsd979obKaKe9
ETL0xfPdJZMJxuAq81Q0eisJGxRhEFbGarL7NlbS+oUrjgufL9m17o0Th5hNLDRE
6d6G05X5gNPezu9LuY9GEDCzxFk2nU5kpZXb1jR0YOBOaY75PeCnuHq21kc0MCCk
waznN6JE/XD1uZ/EXtgQBfG7nRkRw847X0M46yuaxAduDq1R19CYSBdohSd2yOFM
UioH1gqaR7r6KGWfM36fYcYedh2PjcrY54iULEyuswRq02B3V/FizV9U/fWe9Rb/
r7tuWc8xrjXcLMMA5UH+rFG+5WLyEVDtjSSbSKEWa2pVvtd888G/Swl5Xz+ltBcR
Y1Glm80U+FMgeGNt5t0IOtoP75HFqiLB/9wXCk9woBnHYSpQMMVvv0FETp7sz1M4
YK0zUMQJacOhquRU4bbF8tLsbKXePBOn+BnfJzd0Qi4WhbBFnTJJP6XDA2CJpz6A
Ej+SlqTBddnqQOGmHisCxSIA2aFfdpkLnh4S/tkSvCNeZimKYiwI8smgphucCTO+
kPpno+QsWzM64HTj4GVFYUlTYQ232iRFvT8XWgF5UXJkeCv6ieZRP3WHOpUJ778t
ywHJwwpz+EWaphOtNbJP4pvnpbp7jHCMlZb8jHLQNjXGJUHtsBv7vxVd55TebhbA
vrAZpCE6S0+A5/E5o4kg
=Tlyl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.