Opportunities for D

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 9 12:55:47 PDT 2014


On 7/9/2014 8:38 AM, Nick Treleaven wrote:
> On 08/07/2014 23:40, Remo wrote:
>>> What about the already present std.typecons.Unique?
>>
>> Unfortunately there are a lot of /+Doesn't work yet+/ comments in
>> std.typecons.Unique code.
>
> I think it was written a long time ago. I think much of those parts will work
> now. I'm slowly going through them and will make more PRs, here's the first one,
> to disable postblit:
>
> https://github.com/D-Programming-Language/phobos/pull/2308

More things that need to happen with Unique:

   Unique!T u = ...;
   immutable p = u;    // unique references can be implicitly cast to immutable

   Unique!(int*) u = new int;   // must work

   int* p = new int;
   Unique!(int*) u = p;         // must fail


More information about the Digitalmars-d mailing list