c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / lookup15.C
blobc7f3ba01576f8aa662a5403c6a81e5afb910235b
1 // PR c++/94799 - member template function lookup fails.
3 template<typename>
4 struct M { void fn() { } };
6 M<int>* bar (int);
7 M<int> bar2 (int);
9 template<typename T>
10 struct X : M<T> {
11   void xfn ()
12   {
13     this->template M<T>::fn ();
14     bar((T)1)->template M<T>::fn ();
15     bar2((T)1).template M<T>::fn ();
16   }
19 int
20 main ()
22   X<int> x;
23   x.xfn();