1
我想在我的项目中使用boost :: hash_combine。但是,我无法找到包含此函数的boost库(库libboost_functional不存在)。我正在运行Arch。是否有可能我没有安装所有库?要链接哪个库boost :: hash_combine
编辑:
由于sehe指出,包括右头是关键。
#include <iostream>
#include <boost/functional/hash.hpp>
int main() {
int x = 100;
int y = 10;
size_t h = 0;
boost::hash_combine(h, x);
boost::hash_combine(h, y);
std::cout << h << std::endl;
}