Skip to content

Pack indexing breaks syntax highlighting #677

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

Open
1 task done
seishun opened this issue Feb 24, 2025 · 0 comments · May be fixed by #680
Open
1 task done

Pack indexing breaks syntax highlighting #677

seishun opened this issue Feb 24, 2025 · 0 comments · May be fixed by #680

Comments

@seishun
Copy link

seishun commented Feb 24, 2025

Checklist

  • This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

The code with a problem is:

template <typename... T>
constexpr auto first_plus_last(T... values) -> T...[0] {
    return T...[0](values...[0] + values...[sizeof...(values)-1]);
}
int main() {
    // first_plus_last(); // ill formed
    static_assert(first_plus_last(1, 2, 10) == 11);
}

(from P2662R3, the paper that introduced pack indexing)

It looks like:

Image

(Dark+)

It should look like:

static_assert should be blue, not yellow.

@seishun seishun linked a pull request Apr 4, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant