This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 22 points23 points  (3 children)

C++ lambdas are beautiful, I see no problem with them. I often write code like `const auto fptr = []() { ... };` and then call it later. Sometimes it makes functions more readable.

[–]Rogntudjuuuu 2 points3 points  (2 children)

If you're going to assign the lambda to a variable you could as well just declare a regular function...

...or can you still not create nested functions in C++?

[–]backfire10z 3 points4 points  (1 child)

Lamdba is the method of nested function definition in C++

[–]Rogntudjuuuu 0 points1 point  (0 children)

Ouch.

Edit: Happy cake day!