相关疑难解决方法(0)

binary'<':找不到map <std :: string,shared_ptr <Foo >>的运算符

如何解决以下编译器错误:

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
          [
              _Ty=std::string
          ]
          map(177) : see reference to function template instantiation 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty …
Run Code Online (Sandbox Code Playgroud)

c++

-1
推荐指数
1
解决办法
1403
查看次数

标签 统计

c++ ×1