C++ 在标准::unordered_map中设置 std::tuple 值
C++ Setting std::tuple values in an std::unordered_map
我有一个带有字符串键的无序映射和一个由三个字符串和一个整数组成的元组。如何访问各个元组以设置它们。
鉴于:
std::unordered_map<string,std::tuple<string, string, string,int>> foo_data_by_username;
如何设置foo_data_by_username[some_user];
的单个元组值
std::get<0>(foo_data_by_username[some_user]) = "new string";
其中0
是您感兴趣的元组的任何索引。
相关文章:
- std::设置自定义比较器
- std::p 设置或多组的修订问题
- std::设置大小时,vector的性能较低
- std::设置构造函数签名混淆
- 如果t不是不可或缺的,则如何禁用非空std ::设置为函数参数
- STD ::设置带有字符串键和潜在效率损失
- STD ::设置比较器,该比较器指的是外部值
- 用自定义比较器设置操作STD ::设置操作
- 为什么将指针指向std ::设置的提取节点是未定义的行为
- C++std::设置唯一性覆盖
- 在std ::设置中存储一个指针的指针是安全的吗?
- std::设置擦除复杂性异常
- STD ::设置以存储其元素V.S.std :: vector
- std::设置包含对与自定义比较器
- Is STD::设置我应该使用什么来将对象组织到层次结构中
- C++std::从std::deque复制到std:;设置
- 使用函数指针自定义std::设置比较器
- Std::设置快与慢,是怎么回事
- std::设置唯一指针
- std::设置.自定义集合