| 2 | // SPDX-License-Identifier: MIT |
| 3 | |
| 4 | int main() |
| 5 | { |
| 6 | int x = 3; |
| 7 | |
| 8 | auto l1 = [y = x // #A A lambda init-capture, creating a new variable y with x as value |
| 9 | ] { return y; }; |
| 10 | |
| 11 | auto l2 = [x = x // #B The same name of x inside the lambda |
| 12 | ] { return x; }; // #C Here x refers to the x of the lambda, not to the x in the outer scope |
| 13 | } |
nothing calls this directly
no outgoing calls
no test coverage detected