TypeInfo in struct ABI

rikki cattermole rikki at cattermole.co.nz
Mon Jan 17 15:30:21 UTC 2022


TypeInfo is used by a precise GC to determine how to (if it will need 
to) scan memory that is allocated.

But this can be gained by something like typeid(T).

So you should be able to remove the argument if its not used by anything 
if you are templating on the type.

auto blkInf = GC.qalloc(size, flags, typeid(Type));

https://github.com/dlang/druntime/blob/9d99b1ccd90d1e66c31e27cc71b8a266612aa14a/src/rt/lifetime.d#L1116


More information about the Digitalmars-d mailing list