Date
2019-02-15.00:00:00
Message id
6352

Content

[Accepted as a DR at the February, 2019 meeting.]

The current rule for determining when a local entity is odr-usable because of a capture-default is too broad. For example:

  void f() {
    int n;
    void g(int k = n);                  // ill-formed
    [](int k = n) {};                   // ill-formed
    [=](int k = n) {};                  // valid!
    [=](int k = [=]{ return n; }()) {}; // valid!
  }