NetThread.cpp:170:51: error: ‘timerCatch’ in capture list does not name a variable

在C++的lambda表达式中,直接捕获成员变量(如timerCatch)需要显式捕获this指针,因为成员变量属于类实例而非局部作用域。
解决:

NetThread.cpp:170:51: error: ‘timerCatch’ in capture list does not name a variable

在C++的lambda表达式中,直接捕获成员变量(如timerCatch)需要显式捕获this指针,因为成员变量属于类实例而非局部作用域。
解决:

1400
125
960

被折叠的 条评论
为什么被折叠?