better-cpp-syntax
better-cpp-syntax copied to clipboard
Parameters in std::function template parameter are incorrectly colored as types
Checklist
- [x] This problem exists even with the setting
"C_Cpp.enhancedColorization": "Disabled"
The code with a problem is:
#include <functional>
void test(std::function<int (int parameter)> f1) {
std::function<int (int parameter)> f2;
}
It looks like:
Theme: Light+.
It should look like:
parameter in line 3 should look like in line 4.
Interesting, that syntax is new to me, but it looks like its been there since C++ 11.
Note for future me: seems to be an edgecase limited to function<> and not a general templating capability.