C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Copy-construct, move-construct, and PR-construct

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 05 Sep 2023 10:53:08 -0700
On Tuesday, 5 September 2023 00:37:09 PDT Frederick Virchanza Gotham via Std-
Proposals wrote:
> Anyone wanna take a bite out of this?
>
> What we're trying to do is figure out a way of using
> std::optional::emplace to put the unmovable-and-uncopiable return
> value of a function inside an std::optional (or 'variant' or 'any').

Solution: move from the return type to a parameter passed by reference.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-09-05 17:53:09