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:
显式include string,在map前面
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>
相关文章推荐
- error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'std::
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::wstring'
- C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::basic
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- 错误 1 error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::str
- Error 1 error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string'
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string'
- no matching function for call to ‘std::basic_string<char>::assign(std::string&, int)
- error C2679: binary '<<' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion
- implicit instantiation of undefined template 'std::basic_stringstream<char,std::char_trats<char>,std
- 回调函数 typedef bool (*IsUsed)(const string &name,boost::shared_ptr<ShpGeometry> oneGeometry);
- '<>' operator is not allowed for source level below 1.7
- 黑马程序员 struts问题-------->No configuration found for the specified action: 'type2' in namespace: ''.
- 入门计划->学用stl std::map<std::string, int>
- <>' operator is not allowed for source level below 1.7
- No mapping found for dependency [type=java.lang.String, name='struts.objectFactory.spring.autoWire.
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::wstring'