template struct Klass { template void klass_bar() { } }; template int foo(); template int foo() { volatile int i = 10; return i; } template void bar() { } void baz() { } int main() { int x = foo(); return 0; }