#include <iostream>
auto gL =
[](auto&& func, auto&&... params)
{
return std::forward<decltype(func)>(func)(
std::forward<decltype(params)>(params)...);
};
int main() {
gL([](const char * s){std::cout << s << '\n'; return 5;}, "foo");
gL([](const char * s){std::cout << s << '\n'; return;} , "bar");
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKYXV0byBnTCA9IAogICAgW10oYXV0byYmIGZ1bmMsIGF1dG8mJi4uLiBwYXJhbXMpCiAgICB7CiAgICAgICAgcmV0dXJuIHN0ZDo6Zm9yd2FyZDxkZWNsdHlwZShmdW5jKT4oZnVuYykoCiAgICAgICAgICAgIHN0ZDo6Zm9yd2FyZDxkZWNsdHlwZShwYXJhbXMpPihwYXJhbXMpLi4uKTsgCiAgICB9OwogICAgCmludCBtYWluKCkgewoJZ0woW10oY29uc3QgY2hhciAqIHMpe3N0ZDo6Y291dCA8PCBzIDw8ICdcbic7IHJldHVybiA1O30sICJmb28iKTsKCWdMKFtdKGNvbnN0IGNoYXIgKiBzKXtzdGQ6OmNvdXQgPDwgcyA8PCAnXG4nOyByZXR1cm47fSAgLCAiYmFyIik7Cn0=