1
votes

Is it possible to express the following function as a lambda expression?

void f()
{
    return;
}

It is meant to be used as an alias in a template.

1
The simplest thing I could find is void function() - hr0m

1 Answers

3
votes

(){} should work. It uses the old-style lambda syntax, without the arrow. () => {} should also work, but there seems to be some kinda bug that prevents assignment from it to a void function() variable. Works great for template alias parameters, though.