prog.cpp: In function ‘int main()’:
prog.cpp:19:10: error: call of overloaded ‘max(double&, double&)’ is ambiguous
max (x, y);
^
prog.cpp:5:6: note: candidate: ‘void max(T, T) [with T = double]’
void max (T x, T y)
^~~
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = double]’
max(const _Tp& __a, const _Tp& __b)
^~~