C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Making the new expression smart
From: Christopher Head (chead_at_[hidden])
Date: 2020-09-17 16:18:32


On Thu, 17 Sep 2020 22:51:18 +0200
Richard Hodges via Std-Discussion <std-discussion_at_[hidden]>
wrote:

> I am not arguing for or against this idea. I am merely making a few
> observations.
>
> Expanding on the OP’s idea, one could envisage the following syntax:
>
> auto a = new (unique) Foo ();
> auto b = new (shared) Foo ();

Neither am I, just pointing out what I saw to be some limitations.
You’re right, though, overloading or something like it could sort a lot
of that out.

-- 
Christopher Head



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups