Details
-
Suggestion
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
None
-
Arch Linux
Description
Hi,
C++17 supports "structured bindings" . You can find the paper here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0217r3.html
The example below works in C++17, but Qt Creator underlines the for line in red.
std::map<int, std::string> test = { {1, "one"}, {2, "two"}, {3, "three"} }; for (auto&& [key, value]: test) { std::cout << key << " " << value << std::endl; }
I could not test the clang code model as i had a custom clang version compiled without recompiling qtcreator for it's clang codemodel plugin.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-18657 Clang: Correct C++17 code recognized as mistake (libclang 3.9 too old)
- Closed