-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Error on use of parameter in lambda outside function body #111840
New issue
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
Comments
@llvm/issue-subscribers-clang-frontend Author: None (Eczbek)
Compiler Explorer link: https://godbolt.org/z/118sGzbbM
void foo(auto x) noexcept(noexcept([&x] { x; })) {}
int main() {
foo(3);
}
|
@mizvekov you probably want to test your patch with this one |
#107942 has no effect yet on this one, but it probably should. |
This might be invalid because lambdas can only have captures in block scope, and the noexcept specifier/requires clause are outside it :( https://eel.is/c++draft/expr.prim.lambda.capture#3 |
Compiler Explorer link: https://godbolt.org/z/118sGzbbM
The text was updated successfully, but these errors were encountered: