Next: C++ Variants, Up: C++ Semantic Values [Contents][Index]
The %union
directive works as for C, see The Union Declaration. In
particular it produces a genuine union
, which have a few specific
features in C++.
yy::parser::value_type
, not YYSTYPE
.
Because objects have to be stored via pointers, memory is not
reclaimed automatically: using the %destructor
directive is the
only means to avoid leaks. See Freeing Discarded Symbols.