prog.cpp: In function ‘int main()’:
prog.cpp:30:14: error: no matching function for call to ‘Ref::Ref(constRef&)’
prog.cpp:30:14: note: candidates are:
prog.cpp:15:5: note: Ref::Ref(const Ref&)
prog.cpp:15:5: note: no known conversion for argument 1 from ‘constRef’ to ‘const Ref&’
prog.cpp:14:5: note: Ref::Ref(int&)
prog.cpp:14:5: note: no known conversion for argument 1 from ‘constRef’ to ‘int&’
prog.cpp: In function ‘int main2()’:
prog.cpp:43:15: error: invalid initialization of reference of type ‘int&’ from expression of type ‘const int’
prog.cpp:41:16: warning: unused variable ‘c’ [-Wunused-variable]
prog.cpp:42:10: warning: unused variable ‘other’ [-Wunused-variable]
prog.cpp:43:10: warning: unused variable ‘bar’ [-Wunused-variable]