This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas


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

lh_mouse <lh_mouse at 126 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lh_mouse at 126 dot com

--- Comment #1 from lh_mouse <lh_mouse at 126 dot com> ---
Not very sure whether it is related to this one:

    struct foo {
        template<typename F>
        void iterate(F f){
            int i = 1;
            f(i);
        }
        void kick(){
            iterate([&](auto i){ });
        }
    };

Replacing `auto` with `int` gets rid of the warning.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]