Hacker News new | ask | show | jobs
by galkk 14 days ago
Only people who saw nothing bad in passing pairs .begin(), .end() in tons of places in c++ for like 30 years can say that thing like ‘auto&&’ improves anything.
2 comments

What exactly is your complaint with it?

`auto&&` has been standard syntax in C++ for going on 15 years now and has a very clear, irreplaceable meaning - a type-deduced forward reference - to any remotely competent developer.

I think C++ needs more of `:`, `::` and maybe new operators `&&&` and `&&&&`.
C++32 will look like

  for<template> [auto&&&&]:::static (std::for_enumeration_initializer &&&it; @auto: {{const signed&&&&& i const}}) { }
and completely unnecessary in that example, it's a string, type string, makes it way easier to understand