mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
c++: don't obfuscate std::move when not needed
* data/lalr1.cc, data/variant.hh: Avoid macros that depend on the version of C++ when not needed.
This commit is contained in:
@@ -184,7 +184,7 @@ m4_define([b4_variant_define],
|
||||
{
|
||||
build<T> ();
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
as<T> () = YY_MOVE (other.as<T> ());
|
||||
as<T> () = std::move (other.as<T> ());
|
||||
# else
|
||||
swap<T> (other);
|
||||
# endif
|
||||
@@ -198,7 +198,7 @@ m4_define([b4_variant_define],
|
||||
move (self_type&& other)
|
||||
{
|
||||
build<T> ();
|
||||
as<T> () = YY_MOVE (other.as<T> ());
|
||||
as<T> () = std::move (other.as<T> ());
|
||||
other.destroy<T> ();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user