https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100187
--- Comment #3 from 康桓瑋 <hewillk at gmail dot com> --- Hey, the __remove_fn helper lambda __pred in ranges_algo.h#L1259 also has this issue, we need to forward the return type of the operator==. You can see https://godbolt.org/z/ro34WYGnW for the failure case, thanks.