【发布时间】:2017-01-18 06:58:58
【问题描述】:
unordered_map 的示例程序当我使用c++11 or c++17 在 Linux 终端中运行时,它运行良好。我在eclipse Neon.1a Release(4.6.1) 中使用c++11 or c++17 尝试了相同的程序,给出了许多错误消息,包括
没有匹配函数调用‘boost::unordered::unordered_map >::insert(int, std::pair)’ refmap.insert(1, std::make_pair(2,5));
#include <iostream>
#include <boost/unordered_map.hpp>
#include <utility>
typedef boost::unordered_map<int, std::pair<int, int> > reference_map;
reference_map refmap;
int main(){
refmap.insert(1, std::make_pair(2,5));
return 0;
}
【问题讨论】:
标签: c++ boost unordered-map