// PR c++/84348 // { dg-do compile { target c++11 } } template struct A { friend auto foo; // { dg-error "cannot be declared friend" } };