Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-12-05 17:19:28


A recent thread in spirit.general NG suggested to me the need for
a 'tagged variant' extension to boost::variant in order to emulate
the tagged-union mentioned in this post in the thread:

http://article.gmane.org/gmane.comp.parsers.spirit.general/12611

A prototype of such an extension is available in variant_tagged.zip
here:

http://www.boost-consulting.com/vault/index.php?&directory=Data%20Structures

Use of the variant_tagged could be used whenever non-string processing
is required in a spirit parser. Each tag in the using corresponds to
a token-id and each value associated with that token-id is the attribute
for that token-id. This closely emulates the way yacc does it, IIRC,
except it just uses a union and the tag is somehow "implicit".

Is there any interest in using this in spirit or boost in general?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk