/in/foo.cc: In function 'int main()':
/in/foo.cc:16:19: error: no match for 'operator+' (operand types are 'std::vector<student>' and 'int')
16 | sort(st,st+n,cmp);
| ~~^~
| | |
| | int
| std::vector<student>
In file included from /usr/include/c++/12/string:47,
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/stl_iterator.h:630:5: note: candidate: 'template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
630 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:630:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/stl_iterator.h:1786:5: note: candidate: 'template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1786 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1786:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
16 | sort(st,st+n,cmp);
| ^
In file included from /usr/include/c++/12/string:53:
/usr/include/c++/12/bits/basic_string.h:3432:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
3432 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3432:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
In file included from /usr/include/c++/12/string:54:
/usr/include/c++/12/bits/basic_string.tcc:606:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
606 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.tcc:606:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: mismatched types 'const _CharT*' and 'std::vector<student>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.tcc:627:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
627 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.tcc:627:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3472:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'
3472 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3472:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3489:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)'
3489 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3489:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3502:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
3502 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3502:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3509:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
3509 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3509:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3516:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
3516 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3516:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: 'std::vector<student>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3539:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
3539 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/basic_string.h:3539:5: note: template argument deduction/substitution failed:
/in/foo.cc:16:20: note: mismatched types 'const _CharT*' and 'std::vector<student>'
16 | sort(st,st+n,cmp);
| ^
/usr/include/c++/12/bits/basic_string.h:3546:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, __cxx11::basic_string<_CharT, _