#include <iostream>
#include <string>

namespace test {
	struct myClass {
		std::string _name;

		explicit myClass(std::string name) : _name{ name } {}
		void print(std::ostream& os) const { os << _name; }
	};

	std::ostream& operator<<(std::ostream& os, const myClass& mC) {
		mC.print(os);	return os;
	}

	namespace debug {
		std::ostream& operator<<(std::ostream& os, const myClass& mC) {
			os << "debug: ";
			mC.print(os);
			return os;
		}
	}
}

test::myClass mc{"Kai"};

void run() {
	using namespace test;
	std::cout << mc << std::endl;
}

void runDebug() {
	//using test::debug::operator<<;
	std::cout << mc << std::endl;		// das erzeugt den Fehler
	// test::debug::operator<<(std::cout, mc) << std::endl;		// so klappt das

}

int main() {
	run();
	runDebug();
	
	return 0;
}
