// PR c++/79519 // { dg-do compile { target c++11 } } struct A { template void foo(); }; struct B { template friend void A::foo() = delete; // { dg-error "34:cannot define" } };