/in/foo.cc: In function 'int main()':
/in/foo.cc:163:18: error: no matching function for call to 'max(unsigned int&, int)'
163 | lim = max(lim, (int)t.size());
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included 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/ostream:38,
from /usr/include/c++/12/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
/in/foo.cc:163:18: note: deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'int')
163 | lim = max(lim, (int)t.size());
| ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
/in/foo.cc:163:18: note: deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'int')
163 | lim = max(lim, (int)t.size());
| ~~~^~~~~~~~~~~~~~~~~~~~