假设我有一个类型的对象
std::map<std::string, std::tuple<int, float>> data;
是否可以像这样以嵌套方式(即在范围 for 循环中使用时)访问元素类型
for (auto [str, [my_int, my_float]] : data) /* do something */
假设我有一个类型的对象
std::map<std::string, std::tuple<int, float>> data;
是否可以像这样以嵌套方式(即在范围 for 循环中使用时)访问元素类型
for (auto [str, [my_int, my_float]] : data) /* do something */