We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Code is rejected as C++17 on clang-14.0.0 and current trunk. Godbolt: https://godbolt.org/z/YPq3sza68
template <typename T> void f() { constexpr int x = 1; const auto test1 = []() { T y{x}; }; // error: variable 'x' cannot be implicitly captured in a lambda with no capture-default specified const auto test2 = []() { T{x}; }; // Accepted const auto test3 = []() { int y{x}; }; // Accepted const auto test4 = [&x]() { T y{x}; }; // Accepted, warns capture is unnecessary when `f<int>` is intantiated }
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-c-17
Sorry, something went wrong.
@llvm/issue-subscribers-clang-frontend
No branches or pull requests
Code is rejected as C++17 on clang-14.0.0 and current trunk. Godbolt: https://godbolt.org/z/YPq3sza68
The text was updated successfully, but these errors were encountered: