Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
chausner opened this issue Dec 12, 2022 · 1 comment
Open
1 task done

Comments

@chausner
Copy link

Checklist

  • 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.

@jeff-hykin
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants