1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/37093
3 
4 struct A {};
5 
6 template <int A::* p>
7 int
foo(A * q)8 foo(A* q)
9 {
10   return q->*p;
11 }
12 
13 template <typename T>
14 int
bar(int T::* p)15 bar(int T::* p)
16 {
17   return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert|constant)" }
18 }
19 
20 int i = bar<A>(0);
21 
22