c++: don't define variant<S>, directly define semantic_type

Instead of defining yy::variant<S> and then alias
yy::parser::semantic_type to variant<sizeof (union_type)>, directly
define yy::parser::semantic_type.

This model is more appropriate if we want to sit the storage on top of
unions in C++11.

* data/variant.hh (b4_variant_define): Specialize and inline the
definition into...
(b4_value_type_declare): Here.
Define union_type here.
* data/lalr1.cc: Adjust.
This commit is contained in:
Akim Demaille
2018-12-01 18:27:41 +01:00
parent 7d823c505e
commit e76a934853
2 changed files with 36 additions and 41 deletions

View File

@@ -178,8 +178,6 @@ m4_define([b4_shared_declarations],
]b4_bison_locations_if([m4_ifndef([b4_location_file],
[b4_location_define])])[
]b4_variant_if([b4_variant_define])[
/// A Bison parser.
class ]b4_parser_class_name[
{