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?
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/tencent_48319B7BC1C88C517453A80C88BC9AE82D09%40qq.com.