gcc/testsuite/g++.old-deja/g++.pt/memtemp42.C
raw| 1 | // { dg-do link } |
| 2 | // GROUPS passed templates membertemplates |
| 3 | template<class T, int N> |
| 4 | class Foo { |
| 5 | |
| 6 | public: |
| 7 | template<int N2> |
| 8 | Foo<T,N> operator=(const Foo<T,N2>& z) |
| 9 | { |
| 10 | return Foo<T,N>(); |
| 11 | } |
| 12 | }; |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | Foo<double,4> x; |
| 17 | Foo<double,7> y; |
| 18 | x = y; |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 |