Will be installed in a couple of days.
commit d7b391ec2c4027fae458c096fe4de886706ada7d
Author: Akim Demaille <[email protected]>
Date: Sun Aug 12 17:48:08 2018 +0200
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.
diff --git a/data/variant.hh b/data/variant.hh
index f3dee535..990d14d2 100644
--- a/data/variant.hh
+++ b/data/variant.hh
@@ -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([