From e555fb5e558ae9edf82f173bc5eac0a59b448976 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 12 Aug 2018 17:48:08 +0200 Subject: [PATCH] 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. --- data/variant.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ]b4_parser_class_name[::basic_symbol::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([