Qt5 not recognise iteration over a standard map containers in C++17
Unsolved
Qt in Education
-
Hi, I'm new to Qt5. I trying to iterate through std::map by C++ 17 style. However, the key and value seem not to be recognized by the IDE.
std ::map<char, int> my_dict{{'a', 27}, {'b', 3}};
for (const auto &[key, value] : my_dict) {std::cout << key << " has value " << value << std::endl;
}
/home/neoy/Pictures/Screenshot from 2023-11-16 23-43-18.png
-
@Neoy
So, since this is a debugger or Creator issue and not a Qt one, you may find that a newer version handles this feature. Creator is now up to version 11 and you have version 4. Qt 5.12 is 5 years old now. It's from 2018, and you are reporting an issue with C++ 17. Just saying... Also your issue is in whatever is being used as your code model, make sure that is as up-to-date as it can be.