https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92851

            Bug ID: 92851
           Summary: Lambda capture of *this with mutable is not mutable
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: flast at flast dot jp
  Target Milestone: ---

GCC rejects assignment to copied *this even lambda is mutable, like a following
code.

----
    void foo() const
    {
        [*this]() mutable
        {
            a = 0;
        }();
    }
----

https://wandbox.org/permlink/YCzFnI9cDOsPSigf

Reply via email to