C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Replace an object -- but retain old object if new object fails to construct

From: Bjorn Reese <breese_at_[hidden]>
Date: Tue, 21 Oct 2025 19:59:10 +0200
On 10/21/25 18:03, Frederick Virchanza Gotham via Std-Proposals wrote:
> There is more than one scenario in which I would want to replace an
> old object with a new object, but for this use case I'll focus on
> std::optional.

This was big topic when standardizing std::variant. You may want
to look at P0308.

Received on 2025-10-21 17:59:15