gojieba
gojieba copied to clipboard
报错,看不懂
# github.com/yanyiwu/gojieba
In file included from ../../pkg/mod/github.com/yanyiwu/[email protected]/deps/cppjieba/DictTrie.hpp:13,
from ../../pkg/mod/github.com/yanyiwu/[email protected]/deps/cppjieba/QuerySegment.hpp:8,
from ../../pkg/mod/github.com/yanyiwu/[email protected]/deps/cppjieba/Jieba.hpp:4,
from jieba.cpp:5:
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::LTrim(std::string&)’:
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:87:93: warning: ‘std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result (*)(_Arg)) [with _Arg = unsigned int; _Result = bool]’ is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/12/bits/stl_tree.h:65,
from /usr/include/c++/12/set:60,
from ../../pkg/mod/github.com/yanyiwu/[email protected]/deps/cppjieba/QuerySegment.hpp:5:
/usr/include/c++/12/bits/stl_function.h:1126:5: note: declared here
1126 | ptr_fun(_Result (*__x)(_Arg))
| ^~~~~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:87:64: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::RTrim(std::string&)’:
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:92:84: warning: ‘std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result (*)(_Arg)) [with _Arg = unsigned int; _Result = bool]’ is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1126:5: note: declared here
1126 | ptr_fun(_Result (*__x)(_Arg))
| ^~~~~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:92:55: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::LTrim(std::string&, char)’:
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:101:77: warning: ‘std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to<char>; _Tp = char]’ is deprecated: use 'std::bind' instead [-Wdeprecated-declarations]
101 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/stl_function.h:1438:
/usr/include/c++/12/backward/binders.h:172:5: note: declared here
172 | bind2nd(const _Operation& __fn, const _Tp& __x)
| ^~~~~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:101:64: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to<char> >]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
101 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::RTrim(std::string&, char)’:
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:106:68: warning: ‘std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to<char>; _Tp = char]’ is deprecated: use 'std::bind' instead [-Wdeprecated-declarations]
106 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/backward/binders.h:172:5: note: declared here
172 | bind2nd(const _Operation& __fn, const _Tp& __x)
| ^~~~~~~
../../pkg/mod/github.com/yanyiwu/[email protected]/deps/limonp/StringUtil.hpp:106:55: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to<char> >]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
106 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
github.com/yanyiwu/gojieba
In file included from E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/cppjieba/DictTrie.hpp:13,
from E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/cppjieba/QuerySegment.hpp:8,
from E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/cppjieba/Jieba.hpp:4,
from jieba.cpp:5:
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::LTrim(std::string&)':
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp:87:93: warning: 'std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result ()(_Arg)) [with _Arg = unsigned int; _Result = bool]' is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from D:/msys64/mingw64/include/c++/13.2.0/bits/stl_tree.h:65,
from D:/msys64/mingw64/include/c++/13.2.0/set:62,
from E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/cppjieba/QuerySegment.hpp:5:
D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1126:5: note: declared here
1126 | ptr_fun(_Result (__x)(_Arg))
| ^~~~~~~
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp:87:64: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::RTrim(std::string&)':
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp:92:84: warning: 'std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result ()(_Arg)) [with _Arg = unsigned int; _Result = bool]' is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1126:5: note: declared here
1126 | ptr_fun(_Result (__x)(_Arg))
| ^~~~~~~
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp:92:55: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end()); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1046:5: note: declared here
1046 | not1(const _Predicate& __pred)
| ^~~~
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::LTrim(std::string&, char)':
E:\Go\pkg\mod\github.com\yanyiwu\[email protected]\deps/limonp/StringUtil.hpp:101:77: warning: 'std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to
同问
@karlhuang95 @zzdboy
推荐 https://github.com/go-ego/gse 纯粹的go实现,不带cpp。
同问 一模一样的报错...没有解决方法