summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/skeletons/c++.m421
-rw-r--r--tests/headers.at8
2 files changed, 13 insertions, 16 deletions
diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4
index a0dbbd97..b8512b44 100644
--- a/data/skeletons/c++.m4
+++ b/data/skeletons/c++.m4
@@ -301,7 +301,14 @@ m4_define([b4_symbol_type_define],
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
- basic_symbol (basic_symbol&& that);
+ basic_symbol (basic_symbol&& that)
+ : Base (std::move (that))
+ , value (]b4_variant_if([], [std::move (that.value)]))b4_locations_if([
+ , location (std::move (that.location))])[
+ {]b4_variant_if([
+ b4_symbol_variant([this->type_get ()], [value], [move],
+ [std::move (that.value)])
+ ])[}
#endif
/// Copy constructor.
@@ -417,18 +424,6 @@ m4_define([b4_symbol_type_define],
# Provide the implementation needed by the public types.
m4_define([b4_public_types_define],
[[ // basic_symbol.
-#if 201103L <= YY_CPLUSPLUS
- template <typename Base>
- ]b4_parser_class[::basic_symbol<Base>::basic_symbol (basic_symbol&& that)
- : Base (std::move (that))
- , value (]b4_variant_if([], [std::move (that.value)]))b4_locations_if([
- , location (std::move (that.location))])[
- {]b4_variant_if([
- b4_symbol_variant([this->type_get ()], [value], [move],
- [std::move (that.value)])
- ])[}
-#endif
-
template <typename Base>
]b4_parser_class[::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
: Base (that)
diff --git a/tests/headers.at b/tests/headers.at
index f1cb7316..20a9e4c5 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -125,7 +125,9 @@ AT_BISON_OPTION_PUSHDEFS([$1])
AT_DATA_GRAMMAR([input.y],
[[$1
%define parse.error verbose
-]AT_VARIANT_IF([%token <int> 'x'], [%union {int integer;}])[
+]AT_VARIANT_IF([%token <int> X],
+[%union {int integer;}
+%token <integer> X])[
%code {
#include <stdio.h> /* printf. */
]AT_PUSH_IF([[
@@ -138,12 +140,12 @@ AT_DATA_GRAMMAR([input.y],
}
%%
exp:
- 'x' { printf ("x\n"); }
+ X { printf ("x\n"); }
;
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE(["x"])[
+]AT_YYLEX_DEFINE([{AT_CXX_IF([yy::parser::token::])X, 0}])[
]])
AT_BISON_CHECK([-d -o input.AT_LANG_EXT input.y])