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 attention maybe a better way to prevent such issue happen again. Have a nice day, thanks. At 2018-06-24 14:15:37, "redi at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86256 > >Jonathan Wakely <redi at gcc dot gnu.org> changed: > > What |Removed |Added >---------------------------------------------------------------------------- > Status|WAITING |RESOLVED > Resolution|--- |INVALID > >--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- >But this is true for any lambda that captured 'this' or captures by reference. >It doesn't make sense to warn for every use of that language feature, just in >case it's used incorrectly. > >-- >You are receiving this mail because: >You reported the bug.