mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
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:
@@ -770,6 +770,12 @@ $1
|
|||||||
Object::instances.erase (i);
|
Object::instances.erase (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Object& operator= (const Object& that)
|
||||||
|
{
|
||||||
|
val = that.val;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
Object& operator= (char v)
|
Object& operator= (char v)
|
||||||
{
|
{
|
||||||
val = v;
|
val = v;
|
||||||
|
|||||||
Reference in New Issue
Block a user