no suitable conversion function from "lambda []double()->double" to "double" exists
I dont really understand this conversion problem. Even this isnt working and is giving me the same error double random_number = []{ returndouble{ 2 }; };
Both codes actually work even if i dont change them just put () after lambdas body.
When I read Stroustrups book he said that i dont even have to use parentheses if lambda doesnt take any arguments so the shortest lambda would be []{}, now turns out its []{}()?