A while ago I used std::function pretty much like this:
std::function func = [](int i) -> int { return i; };
This looks like it may be ok for anonymous functions.
Quote from http://www.alorelang.org/release/0.5/doc/std_function.html (this is not from the C++ standard library, however it looks like they are using something similar in there bindings down to C++)
Function objects can only be created with a function definition, an anonymous function expression or by accessing a bound method using the dot (.) operator.
Another way this could possibly be done is by storing the function pointer in auto as seen here: http://en.wikipedia.org/wiki/Anonymous_function (C++ section)