better-cpp-syntax icon indicating copy to clipboard operation
better-cpp-syntax copied to clipboard

Parameters in std::function template parameter are incorrectly colored as types

Open chausner opened this issue 2 years ago • 1 comments

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:

image Theme: Light+.

It should look like:

parameter in line 3 should look like in line 4.

chausner avatar Dec 12 '22 20:12 chausner

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.

jeff-hykin avatar Dec 13 '22 17:12 jeff-hykin