1 // PR c++/8785
2 // Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch>
3 // { dg-do compile }
4 
5 template <int N,typename T> struct A //  { dg-message "" }
6 {
7     typedef T X;
8     template <int M> void foo (const A<M,X>&);
9 };
10 
11 template <int N,int M,typename T>
foo(const A<M,X> &)12 void A<N,T>::foo (const A<M,X>&) {} // { dg-error "" }
13