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: Thu, 30 Oct 2025 09:15:27 -0700
On Thursday, 30 October 2025 07:58:22 Pacific Daylight Time Jonathan Wakely
wrote:
> I'll accept a replacement function if realloc() can't be fixed.
>
> realloc can't even be fixed for C, it's a terrible API in several ways.

It works just fine for *properly* trivially relocatable types.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2025-10-30 16:15:35