------- Comment #1 from singler at ira dot uka dot de 2007-09-19 18:42 ------- The standard states clearly (24.3.1):
"Accordingly, it is required that if Iterator is the type of an iterator, the types iterator_traits<Iterator>::difference_type iterator_traits<Iterator>::value_type iterator_traits<Iterator>::iterator_category be defined as..." That this is missing in the requirement lists in 24.1.1 and 24.1.2 is probably due to the fact that it does not concern the Iterator class itself, but iterator_traits<Iterator>. The Sun SGI documentation also states: "If you are defining a new iterator type I, then you must ensure that iterator_traits<I> is defined properly." Thus, struct X is an invalid iterator. -- singler at ira dot uka dot de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |singler at ira dot uka dot | |de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33490