News for hackers. Stuff that matters.
Re:The Sad Truth About C++ Copy Elision by nly on Saturday April 03, 2021 @12:57PM (#26682618)
Having a temporary variable to make code more readable is hardly a 'clever thing'
Re:The Sad Truth About C++ Copy Elision by AlexanderDhoore on Saturday April 03, 2021 @01:12PM (#26682757)
Maybe not in a sane language. But apparently it is in C++.
Re:The Sad Truth About C++ Copy Elision by rualca on Saturday April 03, 2021 @04:12PM (#26684335)
> Having a temporary variable to make code more readable is hardly a 'clever thing'

Right, but if you're sprinkling your code with temp variables, specially with a language such as C++ where copy elision is far from ensured, then you're already not averse to the idea of instantiating variables left and right.