Skip to content

Pack indexing breaks syntax highlighting #677

Open
@seishun

Description

@seishun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions