您的位置:首页 > 运维架构

error C2678 binary '<' : no operator found for map<std::string, shared_ptr<Foo>>

2014-03-20 14:07 603 查看
How can I resolve the following compiler error:
xstddef(180): error C2678: binary '<' : no operator found which takes a left-hand operand of type 'const std::string' (or there is no acceptable conversion)
tuple(572): could be 'bool std::operator <(const std::tuple<> &,const std::tuple<> &)'
while trying to match the argument list '(const std::string, const std::string)'
xstddef(179) : while compiling class template member function 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const'
with
[


显式include string,在map前面

#include <string> // <== IN PARTICULAR THIS ONE
#include <map>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐