prog.cpp: In function ‘int main()’:
prog.cpp:29:21: error: invalid initialization of non-const reference of type ‘Foo&’ from an rvalue of type ‘Foo’
prog.cpp:30:16: error: invalid initialization of non-const reference of type ‘Foo&’ from an rvalue of type ‘Foo’
prog.cpp:17:6: error: in passing argument 1 of ‘void fz(Foo&)’
prog.cpp:32:22: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
prog.cpp:33:16: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
prog.cpp:24:6: error: in passing argument 1 of ‘void iz(int&)’
prog.cpp:29:10: warning: unused variable ‘z’ [-Wunused-variable]
prog.cpp:32:10: warning: unused variable ‘z2’ [-Wunused-variable]