[Bug c++/86256] Lambda will not add ref count for class intelligent pointer member when capture 'this' or & as argument

2018-06-24 Thread kangchuanbo at 126 dot com
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 usage

[Bug c++/86256] Lambda will not add ref count for class intelligent pointer member when capture 'this' or & as argument

2018-06-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86256 Jonathan Wakely changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug c++/86256] Lambda will not add ref count for class intelligent pointer member when capture 'this' or & as argument

2018-06-23 Thread kangchuanbo at 126 dot com
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 member

[Bug c++/86256] Lambda will not add ref count for class intelligent pointer member when capture 'this' or & as argument

2018-06-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86256 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|