Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This makes things seem more complicated than they already are, I feel?

There's nothing special about auto here. It deduces the same type as a template parameter, with the same collapsing rules.

decltype(auto) is a different beast and it's much more confusing. It means, more or less, "preserve the type of the expression, unless given a simple identifier, in which case use the type of the identifier."





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: