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

康桓瑋 <hewillk at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hewillk at gmail dot com

--- Comment #2 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to Jonathan Wakely from comment #1)
> 
> I think that would be OK too.
> 
>         auto __result = *__first;
>         while (++__first != __last)
>           {
>             if (std::__invoke(__comp,
>                               std::__invoke(__proj, __result),
>                               std::__invoke(__proj, *__first)))
>               __result = *__first;
>           }
>         return __result;

`auto __result = *__first;` may not be OK, `range_value_t<_Range>
__result(*__first);` is OK.

Reply via email to