prog.cpp: In function 'void other::run()':
prog.cpp:28:43: error: invalid initialization of reference of type 'const other::Type&' from expression of type 'int'
cout << string("int: " ) + to_string(42) << endl; // this one generates compile-time errors
^
prog.cpp:10:14: note: in passing argument 1 of 'std::string other::to_string(const other::Type&)'
std::string to_string(const Type& type) {
^