记录详情

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:1:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Value = int; _Compare = int]':
/usr/include/c++/6/bits/stl_heap.h:129:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Distance = long int; _Tp = int; _Compare = __gnu_cxx::__ops::_Iter_comp_val<int>]'
/usr/include/c++/6/bits/stl_heap.h:201:23:   required from 'void std::push_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = int]'
/usr/include/c++/6/bits/stl_queue.h:561:16:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::greater<int>; _Sequence = std::vector<int>; _Compare = int; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]'
/in/foo.cc:13:14:   required from here
/usr/include/c++/6/bits/predefined_ops.h:147:11: error: expression cannot be used as a function
  { return bool(_M_comp(*__it, __val)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Iterator2 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = int]':
/usr/include/c++/6/bits/stl_heap.h:217:14:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Distance = long int; _Tp = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
/usr/include/c++/6/bits/stl_heap.h:335:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
/usr/include/c++/6/bits/stl_heap.h:388:23:   required from 'void std::make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = int]'
/usr/include/c++/6/bits/stl_queue.h:447:23:   required from 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&) [with _Tp = std::greater<int>; _Sequence = std::vector<int>; _Compare = int]'
/in/foo.cc:5:52:   required from here
/usr/include/c++/6/bits/predefined_ops.h:125:18: error: expression cannot be used as a function
         { return bool(_M_comp(*__it1, *__it2)); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

信息

递交者
类型
递交
比赛
2020年互联网创新创业科技节程序设计大赛
语言
C++
递交时间
2020-12-09 15:06:13
评测时间
2020-12-09 15:06:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes