Vim incorrectly highlighted initialized list as error inside subscript in C++.
Take this code snippet for example:
std::map<std::pair<int, int>, int> m;
m[{1, 2}] = 42;
In Vim 8.2.4919 on Ubuntu 22.04.1, the braces are displayed in red as error. However, in this case it's actually ok to use braces inside subscript as an initializer list.
This kind of code often appears. A better alternative here may be std::make_pair, but with user-defined structs or classes I can't figure out any better way to do this.
Is this a bug of the highlighter?