Using Lambda with variables in deriving class: Regression or not?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I don't know if this is already known but in a member function, when I
use any variable of the derived class in a lambda,
I get the following error: capture of non-variable 'Derived::Class::variable'

It used to work with GCC (on version 4.6) but now with 4.7 it doesn't
work anymore.

As a workaround I turned

[&variable]() -> void
{
    variable->memfunc();
}

to

[&]() -> void
{
    variable->memfunc();
}


Did I do something wrong or why is this not working anymore?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux