News for hackers. Stuff that matters.
Re:Const all the things? by PaulDavisThe1st on Monday January 24, 2022 @01:45PM (#30062020)
Yes, in C++17, RVO would fix the issue. Alas, some of us are stuck with project conventions that have not reached "use C++17". Without RVO, there's an extra copy.
Re:Const all the things? by masklinn on Monday January 24, 2022 @03:05PM (#30063219)
RVO is not new in C++17 though, only the standard requiring it in some cases.

Unless your compiler is truly ancient odds are good it RVOs just fine no?