mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
glr2.cc: don't publish move ctor to lalr1.cc
These operators were introduced in "c++: add move assignments to the
symbol type" (fdaedc780a) for glr2.cc.
* data/skeletons/c++.m4: Define them for glr2.cc only.
This commit is contained in:
@@ -346,7 +346,7 @@ m4_define([b4_symbol_type_define],
|
|||||||
clear ();
|
clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 201103L <= YY_CPLUSPLUS
|
]b4_glr2_cc_if([[
|
||||||
/// Move assignment.
|
/// Move assignment.
|
||||||
basic_symbol& operator= (basic_symbol&& that)
|
basic_symbol& operator= (basic_symbol&& that)
|
||||||
{
|
{
|
||||||
@@ -357,7 +357,7 @@ m4_define([b4_symbol_type_define],
|
|||||||
location = std::move (that.location);]])[
|
location = std::move (that.location);]])[
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
]])[
|
||||||
|
|
||||||
/// Destroy contents, and record that is empty.
|
/// Destroy contents, and record that is empty.
|
||||||
void clear () YY_NOEXCEPT
|
void clear () YY_NOEXCEPT
|
||||||
@@ -437,10 +437,10 @@ m4_define([b4_symbol_type_define],
|
|||||||
/// Copy constructor.
|
/// Copy constructor.
|
||||||
by_kind (const by_kind& that);
|
by_kind (const by_kind& that);
|
||||||
|
|
||||||
#if 201103L <= YY_CPLUSPLUS
|
]b4_glr2_cc_if([[
|
||||||
/// Move assignment.
|
/// Move assignment.
|
||||||
by_kind& operator= (by_kind&& that);
|
by_kind& operator= (by_kind&& that);
|
||||||
#endif
|
]])[
|
||||||
|
|
||||||
/// The symbol kind as needed by the constructor.
|
/// The symbol kind as needed by the constructor.
|
||||||
typedef token_kind_type kind_type;
|
typedef token_kind_type kind_type;
|
||||||
@@ -570,7 +570,7 @@ m4_define([b4_public_types_define],
|
|||||||
: kind_ (yytranslate_ (t))
|
: kind_ (yytranslate_ (t))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if 201103L <= YY_CPLUSPLUS
|
]b4_glr2_cc_if([[
|
||||||
]b4_inline([$1])]b4_parser_class[::by_kind&
|
]b4_inline([$1])]b4_parser_class[::by_kind&
|
||||||
b4_parser_class[::by_kind::by_kind::operator= (by_kind&& that)
|
b4_parser_class[::by_kind::by_kind::operator= (by_kind&& that)
|
||||||
{
|
{
|
||||||
@@ -578,7 +578,7 @@ m4_define([b4_public_types_define],
|
|||||||
that.clear ();
|
that.clear ();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
]])[
|
||||||
|
|
||||||
]b4_inline([$1])[void
|
]b4_inline([$1])[void
|
||||||
]b4_parser_class[::by_kind::clear () YY_NOEXCEPT
|
]b4_parser_class[::by_kind::clear () YY_NOEXCEPT
|
||||||
|
|||||||
Reference in New Issue
Block a user