PR c++/85553
[official-gcc.git] / gcc / testsuite / g++.dg / other / ptrmem11.C
blobe18abddd677a1397cc7864f6bf950ab65de29102
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/37093
4 struct A {};
6 template <int A::* p>
7 int
8 foo(A* q)
10   return q->*p;
13 template <typename T>
14 int
15 bar(int T::* p)
17   return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert|constant)" }
20 int i = bar<A>(0);