| 1 |
// PR c++/25836 |
| 2 |
|
| 3 |
template <class T> |
| 4 |
class Iter {}; |
| 5 |
|
| 6 |
template <class T> |
| 7 |
class SubIter : public Iter<T> { |
| 8 |
void insert(T); |
| 9 |
}; |
| 10 |
|
| 11 |
class GraphBase { |
| 12 |
public: |
| 13 |
class Node; |
| 14 |
}; |
| 15 |
|
| 16 |
template<class T> |
| 17 |
class Graph : public GraphBase { |
| 18 |
class Inner { |
| 19 |
Iter<typename Graph<T>::Node*> *get(); |
| 20 |
}; |
| 21 |
}; |
| 22 |
|
| 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); |
| 27 |
return 0; |
| 28 |
} |
| 29 |
|
| 30 |
int main() { |
| 31 |
Iter<Graph<int>::Node*> *n2_iter = new SubIter<Graph<int>::Node*>(); |
| 32 |
return 0; |
| 33 |
} |