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:
Akim Demaille
2018-10-20 09:09:45 +02:00
parent d2192653db
commit ace93397c1
2 changed files with 9 additions and 8 deletions

View File

@@ -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