blob: fa9401bee03af1fcf53ab383c32b8007e9f9036c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// { dg-do assemble }
// Origin: Andreas Kloeckner <ak@ixion.net>
template<class Iterator> struct iterator_traits {
typedef typename Iterator::iterator_category
iterator_category; // { dg-error "" } no type iterator_category
};
template<class Category>
struct iterator {
typedef Category iterator_category;
};
template <class Iterator>
struct reverse_iterator : public // { dg-message "instantiated" } no type iterator_category
iterator<typename iterator_traits<Iterator>::iterator_category> {
protected:
Iterator current;
};
class tag { };
template <class T>
struct list {
template <class Item>
struct list_iterator {
};
reverse_iterator<list_iterator<T> > rbegin()
{ return reverse_iterator<list_iterator<T> >
(list_iterator<T>(Head->next())); } // { dg-error "" } not declared
};
template class list<int>;
|