http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #3)
> Of course it should be fixed, it *must* be fixed, actually! And it's really
> annoying that this bug affecting private defaulted destructors (which, I
> bet, aren't that common for most programs not using SFINAE tricks!?!)
The bug affects protected destructors too, and they're commonly used for base
classes to prevent deletion via pointer-to-base. This bug means you can't make
them trivial by defining them as defaulted.
The problem isn't confined to delete expressions as the example from PR56429
shows:
class A
{
A() = default;
};
struct B : A { };
B b;