prog.cpp: In function ‘int main()’:
prog.cpp:13:10: warning: unused variable ‘x’ [-Wunused-variable]
auto x = min( 2, 3 ) ;// success
^
prog.cpp:17:10: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
auto c = min(a,b);// here is error
^
prog.cpp: In instantiation of ‘decltype (a) min(T, T) [with T = main()::A; decltype (a) = main()::A]’:
prog.cpp:17:21: required from here
prog.cpp:4:16: error: no match for ‘operator<’ (operand types are ‘main()::A’ and ‘main()::A’)
return a < b ? a : b;
^
prog.cpp: In function ‘decltype (a) min(T, T) [with T = main()::A; decltype (a) = main()::A]’:
prog.cpp:5:4: warning: control reaches end of non-void function [-Wreturn-type]
}
^