gcc/testsuite/g++.dg/lookup/two-stage4.C
raw| 1 | |
| 2 | // Contributed by Douglas Gregor <[email protected]> |
| 3 | |
| 4 | template<class T> struct wrap {}; |
| 5 | |
| 6 | template<typename T> bool operator==(wrap<T>, wrap<T>); |
| 7 | |
| 8 | template<typename T> |
| 9 | void g(T, wrap<wrap<int> > x) |
| 10 | { |
| 11 | bool b = x == x; // { dg-bogus "" } |
| 12 | } |
| 13 | |
| 14 | template<typename T> void operator==(wrap<wrap<T> >, wrap<wrap<T> >); |
| 15 | |
| 16 | void h() |
| 17 | { |
| 18 | wrap<wrap<int> > x; |
| 19 | g(17, x); |
| 20 | } |