#include <iostream>
struct A
{
template< typename FN, typename... ARGS >
static void call( FN fn, ARGS... args ) { fn(args...) ; }
};
void foo( int a ) { std::cout << "foo(" << a << ")\n" ; }
int main()
{
A::call( foo, 1 ) ;
const auto bar = [] ( int a, double b )
{ std::cout << "main::bar(" << a << ',' << b << ")\n" ; } ;
A::call( bar, 2, 3.4 ) ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEEKewogICAgdGVtcGxhdGU8IHR5cGVuYW1lIEZOLCB0eXBlbmFtZS4uLiBBUkdTID4KICAgIHN0YXRpYyB2b2lkIGNhbGwoIEZOIGZuLCBBUkdTLi4uIGFyZ3MgKSB7IGZuKGFyZ3MuLi4pIDsgfQp9OwoKdm9pZCBmb28oIGludCBhICkgeyBzdGQ6OmNvdXQgPDwgImZvbygiIDw8IGEgPDwgIilcbiIgOyB9CgppbnQgbWFpbigpCnsKICAgIEE6OmNhbGwoIGZvbywgMSApIDsKCiAgICBjb25zdCBhdXRvIGJhciA9IFtdICggaW50IGEsIGRvdWJsZSBiICkKICAgIHsgc3RkOjpjb3V0IDw8ICJtYWluOjpiYXIoIiA8PCBhIDw8ICcsJyA8PCBiIDw8ICIpXG4iIDsgfSA7CgogICAgQTo6Y2FsbCggYmFyLCAyLCAzLjQgKSA7Cn0K