prog.cpp: In function ‘int main()’:
prog.cpp:22:16: error: no matching function for call to ‘f(Shit&)’
cout << f(s) << endl;
^
prog.cpp:22:16: note: candidates are:
prog.cpp:7:5: note: int f(int)
int f(int v) { return square(v); }
^
prog.cpp:7:5: note: no known conversion for argument 1 from ‘Shit’ to ‘int’
prog.cpp:8:8: note: double f(double)
double f(double v) { return square(v); }
^
prog.cpp:8:8: note: no known conversion for argument 1 from ‘Shit’ to ‘double’