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: Wed, 22 Oct 2025 06:56:09 -0700
On Tuesday, 21 October 2025 14:20:26 Pacific Daylight Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> For those 1% of classes, maybe they should be marked with an attribute
> which forbids them to be used with 'emplace_or_retain', something
> like:
>
> class MyClass [[never_retain]] {
> . . .
> };

Or, we mark the ones that are allowed. That's the relocatability attribute.

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

Received on 2025-10-22 13:56:20