C++ Logo

std-proposals

Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 24 Oct 2025 09:08:35 -0700
On Friday, 24 October 2025 08:24:21 Pacific Daylight Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> Sometimes we at the very least want to be left with a safe-to-destroy
> object if the construction fails.

std::optional already guarantees that.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center Group

Received on 2025-10-24 16:08:41