Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
FpUser
on Jan 11, 2025
|
parent
|
context
|
favorite
| on:
C++26: A Placeholder with No Name
I am in a middle ground. Usually do not use auto but in the cases like:
for (auto member : set_of_members)
and some other that are similar by nature auto is a god blessing.
secondcoming
on Jan 11, 2025
|
next
[–]
Except this makes a copy of each member in set_of_members, which is probably not what you want.
https://godbolt.org/z/1YnEs1M34
FpUser
on Jan 11, 2025
|
parent
|
next
[–]
This was to illustrate a point of auto rather than intricacies of copying, referencing. I know what I want and am familiar with auto&, const auto&, auto&& etc. etc.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: