Merge from mainline
[official-gcc.git] / gcc / testsuite / g++.dg / template / init6.C
blob143746642fcb1df1e85dff50f28dd9d8100d6f35
1 // PR c++/25836
3 template <class T>
4 class Iter {};
6 template <class T>
7 class SubIter : public Iter<T> {
8   void insert(T);
9 };
11 class GraphBase {
12 public:
13   class Node;
16 template<class T>
17 class Graph : public GraphBase {
18   class Inner {
19     Iter<typename Graph<T>::Node*> *get();
20   };
23 template<class T>
24 Iter<typename Graph<T>::Node*> *Graph<T>::Inner::get() {
25   SubIter<typename Graph<T>::Node*> *iter;
26   iter->insert(0);
29 int main() {
30   Iter<Graph<int>::Node*> *n2_iter = new SubIter<Graph<int>::Node*>();