summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/typename1.C
blob: 4bf3de39f84a69ae47bb9261aec68a0dd286187a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do assemble  }
// { dg-options "-pedantic -Wno-deprecated" }
// This code snippet should be rejected with -pedantic
// Based on a test case by Louidor Erez <s3824888@techst02.technion.ac.il>


template<class T>
class Vector {
public:
  typedef T* iterator;
};

template<class T>
void f()
{
  Vector<T>::iterator i = 0; // { dg-error "typename" } missing typename
} // { dg-error "expected" "" { target *-*-* } 16 }