I wonder if it\'s possible to write a function that returns a lambda function in C++11. Of course one problem is how to declare such function. Each lambda has a type, but th
You should write like this:
auto returnFunction = [](int x){ return [&x](){ return x; }(); };
to get your return as a function, and use it like:
int val = returnFunction(someNumber);