partiallyQualifiedName?

Nicholas Wilson iamthewilsonator at hotmail.com
Mon Oct 16 23:56:00 UTC 2017


using fullyQualifiedName [here]
(https://github.com/libmir/dcompute/blob/master/source/dcompute/driver/ocl/util.d#L120)
leads to a large compilation slowdown, but I only need it to 
disambiguate up to the module level i.e. so that

struct Context
{
     enum Properties {}
     static struct Info
     {
         @(0) Properties p; // <---
     }
}

...
partiallyQualifiedName!p
...

resolves to Context.Properties instead of 
dcompute.driver.ocl.context.Context.Properties, thus avoiding 
many template instantiations.

  Alas typeof(p).stringof, which yields Properties, errors "No 
such identifier Properties" (and subsequently crashes the CTFE 
engine).

I tried looking at the fullyQualifiedName but got lost pretty 
quick.

Thanks
Nic


More information about the Digitalmars-d-learn mailing list