Anyway to achieve the following

Ali Çehreli acehreli at yahoo.com
Fri Aug 13 09:30:25 UTC 2021


On 8/13/21 1:25 AM, JG wrote:

 > Suppose one has a pointer p of type T*.
 > Can on declare variable a of type T which is stored in the location
 > pointed to by p?

You may be looking for core.lifetime.emplace. (core.lifetime is not on 
dlang.org at the moment for me but it is under 
/usr/include/dmd/druntime/import/core on my computer.)

I have some content about 'emplace' but it is not in std.conv anymore:

   http://ddili.org/ders/d.en/memory.html#ix_memory.construction,%20emplace

Ali



More information about the Digitalmars-d-learn mailing list