Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/ptrtomem2.C

raw
1 // PR c++/85901
2 // { dg-do compile { target c++11 } }
3
4 template<class> struct A;
5
6 template<class U>
7 struct A<int U::*> {
8 template<class TT>
9 static auto c(int U::*p, TT o) -> decltype(o.*p); // { dg-message {A<int U::\*>} }
10 };
11
12 struct X {};
13
14 int x = A<int X::*>::c(); // { dg-error "no matching function for call" }