DIP1000: Scoped Pointers
lobo via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Aug 15 00:19:00 PDT 2016
On Monday, 15 August 2016 at 07:10:00 UTC, ZombineDev wrote:
> On Monday, 15 August 2016 at 04:56:07 UTC, Joseph Rushton
> Wakeling wrote:
>> On Sunday, 14 August 2016 at 10:11:25 UTC, Guillaume Chatelet
>> wrote:
>>> Isn't it what a scoped class is supposed to provide?
>>>
>>> class Rnd {}
>>>
>>> void foo() {
>>> scope rnd = new Rnd; // reference semantic and stack
>>> allocated
>>> }
>>
>> Does that actually work in D2? I thought it was a D1-only
>> thing.
>
> Yes, but for some unknown to me reason it was deprecated (or it
> will be in the future) in favour of std.typecons.scoped.
> Actually, it is used in many places throughout DDMD, so I don't
> think its going away soon.
When was it deprecated? I use it a lot and DMD 2.071.1 gives no
warning.
bye,
lobo
More information about the Digitalmars-d-announce
mailing list