------- Additional Comments From squell at alumina dot nl 2005-07-23 20:08 ------- Created an attachment (id=9338) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9338&action=view) See the original post
There is an issue here that this routine assumes that the result of the operation is CopyConstructible and Assignable. However, this is the same requirement placed on T in std::accumulate(), and the original routine even assumed Assignability of the input iterator's value_type, which in fact _IS NOT_ guaranteed!. This proposal does not assume this (since it doesn't need it anymore), by also replacing the first assignment by a copy construction. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22634