mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user