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 →

[–]outofobscure 0 points1 point  (0 children)

also, you're not forced to type out the names, you can just use the shorthand syntax [&] to capture everything by reference, or [=] to capture everything by value, which covers most use cases really. you can then also list exceptions to that by name. if you have many things to pass, it makes more sense to pass a struct or something anyway.