Relocatable objects and internal pointers

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 29 19:30:05 PST 2016


On 1/29/16 10:13 PM, Matt Elkins wrote:
> On Saturday, 30 January 2016 at 03:00:11 UTC, Steven Schveighoffer wrote:
>> There are some really smart people who frequent these forums, if you
>> post your actual use case, you may get an answer that you hadn't
>> thought of.
>
> Yeah, I tried that first (on the general forum, since at the time I
> didn't know about this one).

Ah, didn't notice that. You are likely to get more eyes there, so that 
is good.

>
>> I saw you were trying to implement something like std::unique_ptr?
>> There is http://dlang.org/phobos/std_typecons.html#.Unique
>
> std.typecons.Unique seems to require heap allocation, which makes it a
> far cry from std::unique_ptr.

I admit I'm not familiar with either's implementation. I just know that 
they have similar functions.

-Steve


More information about the Digitalmars-d-learn mailing list