I have an unordered map with string keys and a tuple of three strings and one int. How can I access the individual tuples to set them.
Given:
std::unordered_map<string,std::tuple<string, string, string,int>> foo_data_by_username;
How can I set the individual tuple values of say foo_data_by_username[some_user];
std::get<0>-- what is "0" supposed to mean)? You might be better off using a custom POD type so that you can give each piece of data a useful name, as well as the ability to add/remove members without having to adjust tuple indices everywhere in your code.