gcc/testsuite/g++.dg/template/unify3.C
raw| 1 | // Test unifying SCOPE_REF. |
| 2 | // Origin: Marc Duflot <[email protected]> |
| 3 | // { dg-do compile } |
| 4 | |
| 5 | template <int n> class A {}; |
| 6 | template <int m> class R {}; |
| 7 | |
| 8 | template <int n> struct Trait { enum {m = n}; }; |
| 9 | |
| 10 | template <int n> R<Trait<n>::m> f(A<n>); |
| 11 | template <> R<1> f(A<1>) {return R<1>();} |