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