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

--- Comment #4 from Vittorio Romeo <vittorio.romeo at outlook dot com> ---
Simplified quite a lot, removed `<tuple>` dependency:
https://gcc.godbolt.org/z/6uNcCN

    struct X
    {
        template <class F>
        void f(F f)
        {
            f(0);
        }
    };

    template <class... Xs>
    void bug(Xs... xs)
    {
        int i;

        [&](auto&... ys)
        {   
            (xs.f([&](auto)
            {
                ys;
            }), ...);
        }(i);
    }

    int main()
    {
        bug(X{});
    }

Reply via email to