[ ] This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"
[ ] This bug exists for C
[x] This bug exists for C++
[ ] This bug exists for Objective-C
[ ] This bug exists for Objective-C++
The code with a problem is:
template <class T> struct example;
// highlighting works perfectly fine here
template <> struct example<unsigned> {};
// this also works perfectly fine
template <>
struct example<int>
{};
// highlighting breaks at <>, doesn't matter if there is anything in it or not.
// doesn't matter if the specialization is partial, full, CV-qualified, or anything else.
template <> struct example<long>
{};
It looks like:
The scope of the <> in the broken example is unexpected. The scope of the < is:
Checklist
"C_Cpp.enhancedColorization": "Disabled"
The code with a problem is:
It looks like:
The scope of the
<>
in the broken example is unexpected. The scope of the<
is:When I would expect it to be:
The scope of the
>
gets even more unexpected:Originally from @evanacox in https://github.com/microsoft/vscode/issues/109098