jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
155 stars 30 forks source link

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

Open chausner opened 1 year ago

chausner commented 1 year ago

Checklist

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.

jeff-hykin commented 1 year ago

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.