Checklist
If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose
The code with a problem is:
#include <bits/stdc++.h>
using namespace std;
int main() {
auto f = [&]() {
vector<int> dp(1 << 2);
for (int i = 0; i < 3; ++i) {
if (i)
return;
}
};
}
It looks like:
Keywords (for/if/return) inside the lambda lose highlighting after the vector dp(1 << 2); line.
It should look like:
Keywords inside the lambda should remain highlighted normally.
Workarounds:
Wrap the expression in parentheses: vector dp((1 << 2));
vector dp(static_cast<size_t>(1ULL << 2));
Precompute the size and pass a variable
Checklist
"C_Cpp.enhancedColorization": "Disabled"If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose
The code with a problem is:
It looks like:
Keywords (for/if/return) inside the lambda lose highlighting after the vector dp(1 << 2); line.
It should look like:
Keywords inside the lambda should remain highlighted normally.
Workarounds:
Wrap the expression in parentheses: vector dp((1 << 2));
vector dp(static_cast<size_t>(1ULL << 2));
Precompute the size and pass a variable