This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77792] Generic lamdba scope issue when working with list::remove_if
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Sep 2016 12:38:17 +0000
- Subject: [Bug c++/77792] Generic lamdba scope issue when working with list::remove_if
- Auto-submitted: auto-generated
- References: <bug-77792-4@http.gcc.gnu.org/bugzilla/>
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();
}