#include <cstdio>

template<typename T> struct hi { };
template<typename T> struct bye { };

template<typename T>
struct Foo
{
	struct Inner {
		template<typename U>
		void hi() { std::printf("hi!\n"); }
		
		void bye() { std::printf("bye!\n"); }
	};

	void sayStuff()
	{
		Inner i;
		i.template hi<T>();
		i.bye();
	}
};


int main() {
	Foo<int> f;
	f.sayStuff();
	return 0;
}