C++ Logo


Advanced search

Re: [std-proposals] Relax the restriction on the operand of a single-object delete-expression

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 04 Sep 2022 07:57:58 -0500
On Sunday, 4 September 2022 03:45:51 CDT blacktea hamburger via Std-Proposals
> Well, it doesn't quite make sense, but it's possible. I think the standard
> should allow all possible and logically plausible codes.

No, it shouldn't and doesn't. There are very good reasons to disallow certain
code that some people may reasonably find logical (such as signed integer
overload). So your argument is not going to hold water.

If you want the standard to change, then provide a good and different argument.

> The wording of [expr.delete]/2 seems to only take into account that objects
> can only be created by new expressions (since IOC was added very late), and
> that's the issue.

I don't see the issue. Why can;'t you new this object using the placement new?

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

Received on 2022-09-04 12:58:00