I'm trying to loop over a vector of tuples:
std::vector<std::tuple<int, int, int>> tupleList;
By using a range based for loop with structured bindings:
for (auto&& [x, y, z] : tupleList) {}
But Visual Studio 2017 15.3.5 gives the error:
cannot deduce 'auto' type (initializer required)
But the following does work:
for (auto&& i : tupleList) {
auto [x, y, z] = i;
}
Why is that?