#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;
}
I2luY2x1ZGUgPGNzdGRpbz4KCnRlbXBsYXRlPHR5cGVuYW1lIFQ+IHN0cnVjdCBoaSB7IH07CnRlbXBsYXRlPHR5cGVuYW1lIFQ+IHN0cnVjdCBieWUgeyB9OwoKdGVtcGxhdGU8dHlwZW5hbWUgVD4Kc3RydWN0IEZvbwp7CglzdHJ1Y3QgSW5uZXIgewoJCXRlbXBsYXRlPHR5cGVuYW1lIFU+CgkJdm9pZCBoaSgpIHsgc3RkOjpwcmludGYoImhpIVxuIik7IH0KCQkKCQl2b2lkIGJ5ZSgpIHsgc3RkOjpwcmludGYoImJ5ZSFcbiIpOyB9Cgl9OwoKCXZvaWQgc2F5U3R1ZmYoKQoJewoJCUlubmVyIGk7CgkJaS50ZW1wbGF0ZSBoaTxUPigpOwoJCWkuYnllKCk7Cgl9Cn07CgoKaW50IG1haW4oKSB7CglGb288aW50PiBmOwoJZi5zYXlTdHVmZigpOwoJcmV0dXJuIDA7Cn0=