https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84012
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- In this context e has a non-dependent type as shared_ptr<a> is a non-dependent type and shared_ptr<a> does not have a conversion to a*. So I don't see why this should accepted.