Why can#39;t I capture this by-reference (#39;amp;this#39;) in lambda?(为什么我不能在 lambda 中捕获这个按引用(amp;this)?)
问题描述
我理解在 lambda 中捕获 this
(以修改对象属性)的正确方法如下:
auto f = [this] () {/* ... *
Why can#39;t I capture this by-reference (#39;amp;this#39;) in lambda?(为什么我不能在 lambda 中捕获这个按引用(amp;this)?)
我理解在 lambda 中捕获 this
(以修改对象属性)的正确方法如下:
auto f = [this] () {/* ... *