:2:13: warning: definition of implicit copy constructor for 'Foo' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-with-dtor]
~Foo() = default;
^
:6:12: note: in implicit copy constructor for 'Foo' first required here
return a;
^