tests: fix -Wdeprecated warning

With recent compilers:

    input.yy:49:5: error: definition of implicit copy assignment
                          operator for 'Object' is deprecated because
                          it has a user-declared destructor
                          [-Werror,-Wdeprecated]
        ~Object ()
        ^
    input.yy:130:35: note: in implicit copy assignment operator for
                           'Object' first required here
        { yylhs.value.as< Object > () = yystack_[0].value.as< Object > (); }

* tests/c++.at (Object): Add missing assignment operator.
This commit is contained in:
Akim Demaille
2018-05-24 09:52:54 +02:00
parent 9c29c52fce
commit 7bb478bd19

View File

@@ -770,6 +770,12 @@ $1
Object::instances.erase (i);
}
Object& operator= (const Object& that)
{
val = that.val;
return *this;
}
Object& operator= (char v)
{
val = v;