Build error
When I try to compile 1.27.5 release, I get this error:
reslist.cpp: In member function ‘virtual std::pair<int, int> ResList::parnumfromdocnum(int)’: reslist.cpp:575:59: error: no matching function for call to ‘begin(std::_Rb_tree_iterator<std::pair<const int, int> >&)’ 575 | for (const auto& entry : m_pageParaToReldocnums.begin()) { | ^ In file included from /usr/include/c++/10.2.0/bits/stl_map.h:62, from /usr/include/c++/10.2.0/map:61, from reslist.cpp:23: /usr/include/c++/10.2.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)’ 90 | begin(initializer_list<_Tp> __ils) noexcept | ^~~~~ /usr/include/c++/10.2.0/initializer_list:90:5: note: template argument deduction/substitution failed: reslist.cpp:575:59: note: ‘std::_Rb_tree_iterator<std::pair<const int, int> >’ is not derived from ‘std::initializer_list<_Tp>’ 575 | for (const auto& entry : m_pageParaToReldocnums.begin()) { | ^ In file included from /usr/include/c++/10.2.0/array:41, from /usr/include/c++/10.2.0/tuple:39, from /usr/include/c++/10.2.0/bits/stl_map.h:63, from /usr/include/c++/10.2.0/map:61, from reslist.cpp:23: /usr/include/c++/10.2.0/bits/range_access.h:51:5: note: candidate: ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&)’ 51 | begin(_Container& __cont) -> decltype(__cont.begin()) | ^~~~~ /usr/include/c++/10.2.0/bits/range_access.h:51:5: note: template argument deduction/substitution failed: /usr/include/c++/10.2.0/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::_Rb_tree_iterator<std::pair<const int, int> >]’: reslist.cpp:575:59: required from here /usr/include/c++/10.2.0/bits/range_access.h:51:50: error: ‘struct std::_Rb_tree_iterator<std::pair<const int, int> >’ has no member named ‘begin’ 51 | begin(_Container& __cont) -> decltype(__cont.begin()) | ~~~~~~~^~~~~ /usr/include/c++/10.2.0/bits/range_access.h:61:5: note: candidate: ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)’ 61 | begin(const _Container& __cont) -> decltype(__cont.begin()) | ^~~~~ /usr/include/c++/10.2.0/bits/range_access.h:61:5: note: template argument deduction/substitution failed: /usr/include/c++/10.2.0/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::_Rb_tree_iterator<std::pair<const int, int> >]’: reslist.cpp:575:59: required from here /usr/include/c++/10.2.0/bits/range_access.h:61:56: error: ‘const struct std::_Rb_tree_iterator<std::pair<const int, int> >’ has no member named ‘begin’ 61 | begin(const _Container& __cont) -> decltype(__cont.begin()) | ~~~~~~~^~~~~ /usr/include/c++/10.2.0/bits/range_access.h:90:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])’ 90 | begin(_Tp (&__arr)[_Nm]) | ^~~~~ /usr/include/c++/10.2.0/bits/range_access.h:90:5: note: template argument deduction/substitution failed: reslist.cpp:575:59: note: mismatched types ‘_Tp [_Nm]’ and ‘std::_Rb_tree_iterator<std::pair<const int, int> >’ 575 | for (const auto& entry : m_pageParaToReldocnums.begin()) { | ^ reslist.cpp:575:59: error: no matching function for call to ‘end(std::_Rb_tree_iterator<std::pair<const int, int> >&)’ In file included from /usr/include/c++/10.2.0/bits/stl_map.h:62, from /usr/include/c++/10.2.0/map:61, from reslist.cpp:23: /usr/include/c++/10.2.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)’ 101 | end(initializer_list<_Tp> __ils) noexcept | ^~~ /usr/include/c++/10.2.0/initializer_list:101:5: note: template argument deduction/substitution failed: reslist.cpp:575:59: note: ‘std::_Rb_tree_iterator<std::pair<const int, int> >’ is not derived from ‘std::initializer_list<_Tp>’ 575 | for (const auto& entry : m_pageParaToReldocnums.begin()) { | ^ In file included from /usr/include/c++/10.2.0/array:41, from /usr/include/c++/10.2.0/tuple:39, from /usr/include/c++/10.2.0/bits/stl_map.h:63, from /usr/include/c++/10.2.0/map:61, from reslist.cpp:23: /usr/include/c++/10.2.0/bits/range_access.h:71:5: note: candidate: ‘template<class _Container> decltype (__cont.end()) std::end(_Container&)’ 71 | end(_Container& __cont) -> decltype(__cont.end()) | ^~~ /usr/include/c++/10.2.0/bits/range_access.h:71:5: note: template argument deduction/substitution failed: /usr/include/c++/10.2.0/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = std::_Rb_tree_iterator<std::pair<const int, int> >]’: reslist.cpp:575:59: required from here /usr/include/c++/10.2.0/bits/range_access.h:71:48: error: ‘struct std::_Rb_tree_iterator<std::pair<const int, int> >’ has no member named ‘end’ 71 | end(_Container& __cont) -> decltype(__cont.end()) | ~~~~~~~^~~ /usr/include/c++/10.2.0/bits/range_access.h:81:5: note: candidate: ‘template<class _Container> decltype (__cont.end()) std::end(const _Container&)’ 81 | end(const _Container& __cont) -> decltype(__cont.end()) | ^~~ /usr/include/c++/10.2.0/bits/range_access.h:81:5: note: template argument deduction/substitution failed: /usr/include/c++/10.2.0/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = std::_Rb_tree_iterator<std::pair<const int, int> >]’: reslist.cpp:575:59: required from here /usr/include/c++/10.2.0/bits/range_access.h:81:54: error: ‘const struct std::_Rb_tree_iterator<std::pair<const int, int> >’ has no member named ‘end’ 81 | end(const _Container& __cont) -> decltype(__cont.end()) | ~~~~~~~^~~ /usr/include/c++/10.2.0/bits/range_access.h:100:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])’ 100 | end(_Tp (&__arr)[_Nm]) | ^~~ /usr/include/c++/10.2.0/bits/range_access.h:100:5: note: template argument deduction/substitution failed: reslist.cpp:575:59: note: mismatched types ‘_Tp [_Nm]’ and ‘std::_Rb_tree_iterator<std::pair<const int, int> >’ 575 | for (const auto& entry : m_pageParaToReldocnums.begin()) { | ^ make[3]: *** [Makefile:7505: .obj/reslist.o] Error 1
How to fix this?