This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/33490] parallel v3: std::accumulate assumes iterators have std::iterator_traits declared
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2007 16:18:18 -0000
- Subject: [Bug libstdc++/33490] parallel v3: std::accumulate assumes iterators have std::iterator_traits declared
- References: <bug-33490-102@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bkoz at gcc dot gnu dot org 2007-10-18 16:18 -------
Current mainline in parallel mode still has this fail, for the record.
Looking at the concepts code....
From:
http://www.generic-programming.org/software/ConceptGCC/
include/bits/stl_numeric.h:
template<_GLIBCXX_REQ_PARM(InputIterator, _Iter),
_GLIBCXX_REQ_PARM(CopyConstructible, _Tp)>
_GLIBCXX_WHERE(Addable<_Tp, _Iter::value_type>,
Assignable<_Tp,
Addable<_Tp, _Iter::value_type>::result_type>)
_Tp
accumulate(_Iter __first, _Iter __last, _Tp __init)
{
__glibcxx_requires_valid_range(__first, __last);
for (; __first != __last; ++__first)
__init = __init + *__first;
return __init;
}
which is also assuming iterator_traits::value_type....
-benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33490