Date
2021-10-15.00:00:00
Message id
3519

Content

[Accepted as a DR at the October, 2021 meeting.]

Consider the following example:

    void f(int i) {
      auto l1 = [i] {
        auto l2 = [&i] {
          ++i;    // Well-formed?
        };
      };
    }

Because the l1 lambda is not marked as mutable, its operator() is const; however, it is not clear from the wording of 7.5.6 [expr.prim.lambda] paragraph 16 whether the captured member of the enclosing lambda is considered const or not.