C++: symbol constructors: add a missing reference

Fix a typo so that instead of

    basic_symbol::basic_symbol (typename Base::kind_type t, const int v)

we now generate

    basic_symbol::basic_symbol (typename Base::kind_type t, const int& v)

* data/variant.hh (b4_basic_symbol_constructor_declare)
(b4_basic_symbol_constructor_define): Add missing reference.
This commit is contained in:
Akim Demaille
2018-08-12 17:48:08 +02:00
parent 0931d14728
commit e555fb5e55

View File

@@ -334,7 +334,7 @@ m4_define([b4_basic_symbol_constructor_declare],
[[
basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[& v]),
b4_locations_if([const location_type& l]))[);
]])
@@ -346,7 +346,7 @@ m4_define([b4_basic_symbol_constructor_define],
template <typename Base>
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[& v]),
b4_locations_if([const location_type& l]))[)
: Base (t)]b4_symbol_if([$1], [has_type], [
, value (v)])[]b4_locations_if([