Compile Error

In file included from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algobase.h:71,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/string:50,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/locale_classes.h:40,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/ios_base.h:41,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/ios:42,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/istream:38,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/sstream:38,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/complex:45,
                 from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/ccomplex:39,
                 from stdc++.h:54:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = fun*; _Iterator2 = fun*]':
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1809:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1849:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1940:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:4820:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = fun*]'
foo.cc:14:6:   required from here
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:45:23: error: no match for 'operator<' (operand types are 'fun' and 'fun')
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/string:47:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)'
 1246 |     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:45:23: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)'
 1254 |     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:45:23: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&, _Iterator) const [with _Value = fun; _Iterator = fun*]':
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1789:20:   required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Val_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1817:36:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1849:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1940:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:4820:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = fun*]'
foo.cc:14:6:   required from here
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:98:22: error: no match for 'operator<' (operand types are 'fun' and 'fun')
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)'
 1246 |     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:98:22: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)'
 1254 |     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:98:22: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = fun*; _Value = fun]':
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_heap.h:140:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = fun*; _Distance = long int; _Tp = fun; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_heap.h:247:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = fun*; _Distance = long int; _Tp = fun; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_heap.h:356:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1629:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1900:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1916:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = fun*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:1937:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = fun*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_algo.h:4820:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = fun*]'
foo.cc:14:6:   required from here
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:69:22: error: no match for 'operator<' (operand types are 'fun' and 'fun')
   69 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)'
 1246 |     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1246:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:69:22: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   69 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)'
 1254 |     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/stl_iterator.h:1254:5: note:   template argument deduction/substitution failed:
/nix/store/np14qqgvvnyna3vv640hmhi21flymiia-gcc-12.2.0/include/c++/12.2.0/bits/predefined_ops.h:69:22: note:   'fun' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   69 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1230 2-1 比赛榜单
比赛
2023.5.20中级班期中测试赛
语言
C++
递交时间
2023-05-20 09:32:40
评测时间
2023-05-20 09:32:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes