#include <iostream>
#include <string>

namespace other {
	enum class Type {
		Type1,
		Type2
	};
	
	std::string to_string(const Type& type) {
		switch(type) {
			case Type::Type1:
				return "Type1";
				break;
			case Type::Type2:
				return "Type2";
				break;
			default:
			{}
		}
		
		return "Unknown";
	}
	
	void run() {
		using namespace std;
		cout << string("Type: ") + to_string(Type::Type1) << endl;
		cout << string("int: " )  + to_string(42) << endl;  // this one generates compile-time errors
	}
}

int main() {
	other::run();
	
	using namespace std;
	cout << string("int: " )  + to_string(42) << endl;  // This one is ok

	return 0;
}