C++ Logo

std-proposals

Advanced search

Re: [std-proposals] return if

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 14 Jan 2026 05:30:42 -0800
On Wednesday, 14 January 2026 04:54:34 Pacific Standard Time Frederick
Virchanza Gotham via Std-Proposals wrote:
> Actually it might be even more complicated than that if we want NRVO
> on the 'x' variable too:

And you don't think explaining all these edge cases would be extremely hard?
It would make the new construct harder to use because there will be fewer
people who understand what happens. It will be hard to teach.

Plus, in the majority of cases, the complexity isn't necessary. Therefore, in
the majority of cases, the new construct isn't any better than the statements
it replaces.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-01-14 13:30:57