#include <iostream>
template < typename T > struct A
{
template< void (*FN) (T) > static void call( T arg ) { FN(arg) ; }
static void call( void (*fn)(T), T arg ) { fn(arg) ; }
};
void foo( int a ) { std::cout << "foo(" << a << ")\n" ; }
int main()
{
A<int>::call<foo>(1) ;
A<int>::call( foo, 2 ) ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPCB0eXBlbmFtZSBUID4gc3RydWN0IEEKewogICAgdGVtcGxhdGU8IHZvaWQgKCpGTikgKFQpID4gc3RhdGljIHZvaWQgY2FsbCggVCBhcmcgKSB7IEZOKGFyZykgOyB9CgoJc3RhdGljIHZvaWQgY2FsbCggdm9pZCAoKmZuKShUKSwgVCBhcmcgKSB7IGZuKGFyZykgOyB9Cn07Cgp2b2lkIGZvbyggaW50IGEgKSB7IHN0ZDo6Y291dCA8PCAiZm9vKCIgPDwgYSA8PCAiKVxuIiA7IH0KCmludCBtYWluKCkKewogICAgQTxpbnQ+OjpjYWxsPGZvbz4oMSkgOwoKICAgIEE8aW50Pjo6Y2FsbCggZm9vLCAyICkgOwp9Cg==