We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The last two lines of the example read:
int j; auto x3 = []()->auto&& { return j; }; // OK: return type is int&
However j is not captured and the lambda doesn't have a default capture.
j
The correct code should be:
int j; auto x3 = [&]()->auto&& { return j; }; // OK: return type is int& ^
The text was updated successfully, but these errors were encountered:
I think j should be interpreted as having namespace scope, so it needn't (and can't) be captured.
Sorry, something went wrong.
My bad., I wrongly reproduced the example with j in a local scope.
No branches or pull requests
The last two lines of the example read:
However
j
is not captured and the lambda doesn't have a default capture.The correct code should be:
The text was updated successfully, but these errors were encountered: