blob: 79cad0acb99bac6a1f38c6cae7eb32327621e31b [file] [log] [blame]
// PR c++/39560
// { dg-options -Wunused }
struct X { };
class Z {
public:
X* cc(int c);
};
class F {
public:
typedef X* (Z::*MethO)(int);
typedef X* (F::*MethF)(int);
template<MethO m>
X* xwrapper(int i) {
union {
Z *z;
F *f;
}; // { dg-bogus "unused" }
f = this;
return ((z->*m)(i));
}
};
F::MethF meth = &F::xwrapper<&Z::cc>;