/ Vijos /

记录详情

Compile Error

In file included from /usr/include/c++/6/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = SCL*; _Value = const SCL; _Compare = bool (*)(SCL&, SCL&)]':
/usr/include/c++/6/bits/stl_algobase.h:959:14:   required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = SCL*; _Tp = SCL; _Compare = __gnu_cxx::__ops::_Iter_comp_val<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:2498:26:   required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = SCL*; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:2769:34:   required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = SCL*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:4877:28:   required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = SCL*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:4948:36:   required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = SCL*; _Compare = bool (*)(SCL&, SCL&)]'
/in/foo.cc:39:36:   required from here
/usr/include/c++/6/bits/predefined_ops.h:147:11: error: binding 'const SCL' to reference of type 'SCL&' discards qualifiers
  { return bool(_M_comp(*__it, __val)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = const SCL; _Iterator = SCL*; _Compare = bool (*)(SCL&, SCL&)]':
/usr/include/c++/6/bits/stl_algo.h:2049:14:   required from '_ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = SCL*; _Tp = SCL; _Compare = __gnu_cxx::__ops::_Val_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:2507:26:   required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = SCL*; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:2769:34:   required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = SCL*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:4877:28:   required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = SCL*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(SCL&, SCL&)>]'
/usr/include/c++/6/bits/stl_algo.h:4948:36:   required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = SCL*; _Compare = bool (*)(SCL&, SCL&)]'
/in/foo.cc:39:36:   required from here
/usr/include/c++/6/bits/predefined_ops.h:173:11: error: binding 'const SCL' to reference of type 'SCL&' discards qualifiers
  { return bool(_M_comp(__val, *__it)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1771 瑞士轮
语言
C++
递交时间
2021-02-02 19:01:06
评测时间
2021-02-02 19:01:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes