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++/77792] Generic lamdba scope issue when working with list::remove_if


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-09-29
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

template<typename Pred>
    void remove_if(Pred pred) {
        pred(1);
    }

template<typename U>
struct S {
    template<typename> 
    static void f() { } 

    void run() {
        remove_if([](auto) { &f<int>; }); // (2)
    }
};

int main() {
    S<void> s;
    s.run();
}

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