[Bug libstdc++/33490] parallel v3: std::accumulate assumes iterators have std::iterator_traits declared
singler at ira dot uka dot de
gcc-bugzilla@gcc.gnu.org
Wed Sep 19 18:42:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list