yanyiwu / libcppjieba

The simple header file library of CppJieba
40 stars 17 forks source link

加上-std=c++0x 或者-std=c++11编译错误 #2

Closed lotusnowshen closed 10 years ago

lotusnowshen commented 10 years ago

Ubuntu 12.04LTS g++: 4.6.4

编译错误信息如下: In file included from ./include/MixSegment.hpp:5:0, from demo.cpp:5: ./include/MPSegment.hpp: In member function ‘bool CppJieba::MPSegment::cut(Limonp::LocalVector::const_iterator, Limonp::LocalVector::const_iterator, std::vector<Limonp::LocalVector >&) const’: ./include/MPSegment.hpp:103:106: error: no matching function for call to ‘make_pair(size_t&, NULL)’ ./include/MPSegment.hpp:103:106: note: candidate is: /usr/include/c++/4.6/bits/stl_pair.h:262:5: note: template<class _T1, class _T2> std::pair<typename std::decay_and_strip<_T1>::type, typename std::decay_and_strip<_T2>::type> std::make_pair(_T1&&, _T2&&) make: *\ [all] Error 1

-std=c++11是在ubutnu14.04上测试的,错误相同

yanyiwu commented 10 years ago

@guochy2012 已经修复了,你更新一下代码再试试。

lotusnowshen commented 10 years ago

问题解决。