#include <iostream>
using namespace std;

namespace foo {
	namespace bar {
		struct X {};
	}
	void magic(bar::X const & x) { cout << "foo magic" << endl; }
}

template <typename T>
void magic(T const & t) { cout << "template magic" << endl; }

void test1(){
	foo::bar::X x;
	magic(x);
}

namespace foo {
	inline namespace bar{}
}

void test2(){
	foo::bar::X x;
	magic(x);
}

int main() {
	test1();
	test2();
}