I\'m wondering why =
capture-default mode prohibits this
in capture-list of C++ lambda expression.
That is,
this
can only be captured by copy and never by reference. Even if you specify only [&]
, this
can be implicitly captured by copy if odr-used. Therefore, [=, this]
is an error because =
would already implicitly capture this
by copy while the &
in [&, this]
signifies capture by reference and does not implicitly capture this
(unless it is odr-used)