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

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to 康桓瑋 from comment #0)
> So I think it should be relatively safe to inline all std::__invoke calls.

I'm not sure we can inline these std::__invoke calls actually, because the
standard has strict limits about the number of times these algorithms can apply
the projection function, see https://eel.is/c++draft/alg.is.permutation#7 and
https://eel.is/c++draft/alg.clamp#5.

So if we e.g. inlined __proj_val in ranges::clamp, we'd be performing up to 4
projection applications instead of 3.

Reply via email to