The compiler said, that :
no matching function for call to 'foo::foo(foo)'
teszt.cpp:10: note: candidates are: foo::foo(foo&)
teszt.cpp:9: note: foo::foo()
Why can't it make a reference to the return value?
When I write the copy construcot's parameter as a const, it works.