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.
---
tests/c++.at | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/c++.at b/tests/c++.at
index a7878650..d708a5ba 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -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;
--
2.17.0