/in/foo.cc:8:17: error: 'xyp' has not been declared
8 | bool cmp (xpy x,xyp y)
| ^~~
/in/foo.cc: In function 'bool cmp(xpy, int)':
/in/foo.cc:10:23: error: request for member 'yw' in 'y', which is of non-class type 'int'
10 | return x.yw>y.yw || x.yw==y.yw && x.sx>y.sx;
| ^~
/in/foo.cc:10:37: error: request for member 'yw' in 'y', which is of non-class type 'int'
10 | return x.yw>y.yw || x.yw==y.yw && x.sx>y.sx;
| ^~
/in/foo.cc:10:50: error: request for member 'sx' in 'y', which is of non-class type 'int'
10 | return x.yw>y.yw || x.yw==y.yw && x.sx>y.sx;
| ^~
In file included from /usr/include/c++/12/bits/stl_algobase.h:71,
from /usr/include/c++/12/string:50,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/ios:42,
from /usr/include/c++/12/istream:38,
from /usr/include/c++/12/sstream:38,
from /usr/include/c++/12/complex:45,
from /usr/include/c++/12/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:54,
from /in/foo.cc:1:
/usr/include/c++/12/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = xpy*; _Iterator2 = xpy*; _Compare = bool (*)(xpy, int)]':
/usr/include/c++/12/bits/stl_algo.h:1809:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1849:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1940:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:4853:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = xpy*; _Compare = bool (*)(xpy, int)]'
/in/foo.cc:17:6: required from here
/usr/include/c++/12/bits/predefined_ops.h:158:30: error: cannot convert 'xpy' to 'int' in argument passing
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = xpy; _Iterator = xpy*; _Compare = bool (*)(xpy, int)]':
/usr/include/c++/12/bits/stl_algo.h:1789:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1817:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1849:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1940:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:4853:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = xpy*; _Compare = bool (*)(xpy, int)]'
/in/foo.cc:17:6: required from here
/usr/include/c++/12/bits/predefined_ops.h:240:30: error: cannot convert 'xpy' to 'int' in argument passing
240 | { return bool(_M_comp(__val, *__it)); }
| ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/12/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = xpy*; _Value = xpy; _Compare = bool (*)(xpy, int)]':
/usr/include/c++/12/bits/stl_heap.h:140:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = xpy*; _Distance = long int; _Tp = xpy; _Compare = __gnu_cxx::__ops::_Iter_comp_val<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_heap.h:247:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = xpy*; _Distance = long int; _Tp = xpy; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_heap.h:356:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1629:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1900:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1916:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = xpy*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:1937:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = xpy*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(xpy, int)>]'
/usr/include/c++/12/bits/stl_algo.h:4853:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = xpy*; _Compare = bool (*)(xpy, int)]'
/in/foo.cc:17:6: required from here
/usr/include/c++/12/bits/predefined_ops.h:196:30: error: cannot convert 'xpy' to 'int' in argument passing
196 | { return bool(_M_comp(*__it, __val)); }
| ~~~~~~~^~~~~~~~~~~~~~