gcc/testsuite/g++.old-deja/g++.other/typename1.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "-pedantic -Wno-deprecated" } |
| 3 | // This code snippet should be rejected with -pedantic |
| 4 | // Based on a test case by Louidor Erez <[email protected]> |
| 5 | |
| 6 | |
| 7 | template<class T> |
| 8 | class Vector { |
| 9 | public: |
| 10 | typedef T* iterator; |
| 11 | }; |
| 12 | |
| 13 | template<class T> |
| 14 | void f() |
| 15 | { |
| 16 | Vector<T>::iterator i = 0; // { dg-error "typename" "typename" } missing typename |
| 17 | } |