diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-09-13 06:00:43 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-09-13 06:18:57 +0200 |
commit | 70441b5ab190b53f59acab619d462a5f4ac58968 (patch) | |
tree | 7b15995460dd1573b0be792c5da2d2c588afd746 | |
parent | 7538d8dc1a0a1d3313add2b31b47a0ea02ca8a74 (diff) | |
download | bison-70441b5ab190b53f59acab619d462a5f4ac58968.tar.gz |
glr2.cc: don't publish move ctor to lalr1.cc
These operators were introduced in "c++: add move assignments to the
symbol type" (fdaedc780af0dd678a4f4fa3175a201a553be20a) for glr2.cc.
* data/skeletons/c++.m4: Define them for glr2.cc only.
-rw-r--r-- | data/skeletons/c++.m4 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4 index 7d74776d..c16741c7 100644 --- a/data/skeletons/c++.m4 +++ b/data/skeletons/c++.m4 @@ -346,7 +346,7 @@ m4_define([b4_symbol_type_define], clear (); } -#if 201103L <= YY_CPLUSPLUS +]b4_glr2_cc_if([[ /// Move assignment. basic_symbol& operator= (basic_symbol&& that) { @@ -357,7 +357,7 @@ m4_define([b4_symbol_type_define], location = std::move (that.location);]])[ return *this; } -#endif +]])[ /// Destroy contents, and record that is empty. void clear () YY_NOEXCEPT @@ -437,10 +437,10 @@ m4_define([b4_symbol_type_define], /// Copy constructor. by_kind (const by_kind& that); -#if 201103L <= YY_CPLUSPLUS +]b4_glr2_cc_if([[ /// Move assignment. by_kind& operator= (by_kind&& that); -#endif +]])[ /// The symbol kind as needed by the constructor. typedef token_kind_type kind_type; @@ -570,7 +570,7 @@ m4_define([b4_public_types_define], : kind_ (yytranslate_ (t)) {} -#if 201103L <= YY_CPLUSPLUS +]b4_glr2_cc_if([[ ]b4_inline([$1])]b4_parser_class[::by_kind& b4_parser_class[::by_kind::by_kind::operator= (by_kind&& that) { @@ -578,7 +578,7 @@ m4_define([b4_public_types_define], that.clear (); return *this; } -#endif +]])[ ]b4_inline([$1])[void ]b4_parser_class[::by_kind::clear () YY_NOEXCEPT |