Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kangchuanbo at 126 dot com
Target Milestone: ---
For example:
#include
#include
class A {
public:
A(){
tmp = std:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86256
--- Comment #2 from kangchuanbo at 126 dot com ---
Once Lamdba capture this ( one class instance which have std::shared_ptr<>
member), the std::shared_ptr member will not increase ref count inside Lambda
body, this is dangerous, once this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86256
--- Comment #4 from kangchuanbo at 126 dot com ---
OK, thanks for your response, I just met this issue and think it's better to
give warn or error when Lambda capture this or reference with std::shared_ptr
member inside.
So add one Lambda