foo.cpp: In function 'int main()':
foo.cpp:40:26: error: no matching function for call to 'max(long long int&, int&)'
foo.cpp:40:26: note: candidates are:
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41:0,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ios:41,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ostream:40,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/iostream:40,
from foo.cpp:3:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:210:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:210:5: note: template argument deduction/substitution failed:
foo.cpp:40:26: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41:0,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ios:41,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ostream:40,
from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/iostream:40,
from foo.cpp:3:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:254:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
foo.cpp:40:26: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')