#include using namespace std; int main() { int x = 8; auto somefunk = [=](int arg)->int { return x + arg; }; cout << somefunk(7) << endl; auto obviousreturntype = [](int arg1, int arg2) { return arg1 + arg2; }; cout << obviousreturntype(13,4) << endl; float f = 3.25; double d = 2.0; auto anotherfunk = [f,d]() { // f = 3.25; // Error, f is read-only return f + d; }; auto ret1 = anotherfunk(); cout << ret1 << ' ' << sizeof(ret1) << endl; auto stillanotherfunk = [f,d]() -> float { // f = 3.25; // Error, f is read-only return f + d; }; auto ret2 = stillanotherfunk(); cout << ret2 << ' ' << sizeof(ret2) << endl; }