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

Content

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

The status of an example like the following is unclear:

  int foo(int a = ([loc=1] { return loc; })()) { return a; }

because of 7.5.6.3 [expr.prim.lambda.capture] paragraph 9:

A lambda-expression appearing in a default argument shall not implicitly or explicitly capture any entity.

However, there doesn't appear to be a good reason for prohibiting such a capture.