C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::elide

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Thu, 23 May 2024 10:58:48 -0400
On Thu, May 23, 2024 at 10:28 AM Maciej Cencora via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> What kind of semantic ambiguities are you talking about?
> I've provided you with a specific example where without NRVO you cannot construct and return big arrays or structs thereof with a guarantee that it won't blow up the stack.
> Using std::array doesn't solve the issue (just gets rid of one out of three problems there).

If the problem is "I can't return arrays", maybe fix *that* instead of
this hackery. There are plenty of places where someone wants to return
an array where RVO isn't really the solution.

Received on 2024-05-23 14:59:01