编译错误信息如下:
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
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上测试的,错误相同