On Sunday, 4 September 2022 03:45:51 CDT blacktea hamburger via Std-Proposals
wrote:
> 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?
The above snippets have a common theme: they attempt to use objects that they never created. Indeed, there is a family of types for which programmers assume they do not need to explicitly create objects. We propose to identify these types, and carefully carve out rules that remove the need to explicitly create such objects, by instead creating them implicitly.