Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
TeMPOraL
on Aug 4, 2020
|
parent
|
context
|
favorite
| on:
Syntax changes from C++11 to C++20
By having the compiler generate the equivalent of [&args...], where args are names of arguments in the parent function's header.
jcelerier
on Aug 4, 2020
|
next
[–]
why [&args...] and not [args...] ? do you really want to capture by reference when you're setting a lambda as a callback ? (likewise in the other direction - tons of arguments for every default, already debated ad nauseam)
gpderetta
on Aug 4, 2020
|
parent
|
next
[–]
And why specifically args instead of all locals?
nwallin
on Aug 4, 2020
|
prev
[–]
You mean like this?
https://godbolt.org/z/jvG3hY
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: