diff options
Diffstat (limited to 'data/c++.m4')
-rw-r--r-- | data/c++.m4 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/c++.m4 b/data/c++.m4 index 45b4322c..613e921b 100644 --- a/data/c++.m4 +++ b/data/c++.m4 @@ -183,6 +183,9 @@ m4_define([b4_public_types_declare], /// Default constructor. inline symbol_type (); + /// Destructive move, \a s is emptied. + inline void move (symbol_type& s); + /// Constructor for tokens with semantic value. inline symbol_type (]b4_args([token_type t], [const semantic_type& v], @@ -293,6 +296,16 @@ m4_define([b4_public_types_define], } inline + void + ]b4_parser_class_name[::symbol_type::move (symbol_type& s) + { + ]b4_variant_if([b4_symbol_variant([[s.type]], [value], [build], [s.value])], + [value = s.value;])[ + type = s.type;]b4_locations_if([ + location = s.location;])[ + } + + inline int ]b4_parser_class_name[::symbol_type::type_get_ () const { |