https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126604
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think we still want to use std::move(init) when passing it along, but should
do:
--- a/libstdc++-v3/include/std/numeric
+++ b/libstdc++-v3/include/std/numeric
@@ -583,7 +583,8 @@ namespace __detail
{
if (__first != __last)
{
- auto __init = _GLIBCXX_ITER_MOVE(__first);
+ typename iterator_traits<_InputIterator>::value_type __init
+ = *__first;
*__result++ = __init;
++__first;
if (__first != __last)