https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86471

--- Comment #6 from Matt Bentley <mattreecebentley at gmail dot com> ---
Suggested patch for libstdc++, std_algobase.h, line 688:
  template<typename _ForwardIterator, typename _Tp>
    inline typename
    __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
    __fill_a(_ForwardIterator __first, _ForwardIterator __last,
             const _Tp& __value)
    {
      if (__value != reinterpret_cast<_Tp>(0))
      {
              const _Tp __tmp = __value;
              for (; __first != __last; ++__first)
                *__first = __tmp;
                }
                else
                {
              if (const size_t __len = __last - __first)
                __builtin_memset(reinterpret_cast<void *>(__first), 0, __len *
sizeof(_Tp));
                }
    }

Comments?

Reply via email to